Back to index

courier  0.68.2
pcpdauthtoken.h
Go to the documentation of this file.
00001 #ifndef pcpdauthtoken_h
00002 #define pcpdauthtoken_h
00003 
00004 /*
00005 ** Copyright 2001 Double Precision, Inc.  See COPYING for
00006 ** distribution information.
00007 */
00008 
00009 
00010 #include "config.h"
00011 #include <time.h>
00012 #include <sys/time.h>
00013 
00014 /*
00015 ** Internally-generated random authentication token seeds.
00016 **
00017 ** An authentication token consists of: user@domain.time.hash, where
00018 ** 'hash' is an HMAC-SHA1 hash of 'user@domain.time', with a randomly-generated
00019 ** 128-bit secret token.
00020 */
00021 
00022 void authtoken_init();
00023 time_t authtoken_check();
00024 char *authtoken_create(const char *, time_t);
00025 int authtoken_verify(const char *, const char *, time_t *);
00026 
00027 #endif