ESAPI-C 1.0
The OWASP Enterprise Security API for C

authenticator.h

00001 #include <stdio.h>
00002 #include "user.h"
00003 #include "esapi.h"
00004 
00005 #ifndef _AUTHENTICATOR_H
00006 #define _AUTHENTICATOR_H
00007 
00008 #define ES_AUTH_NO_USER   -1
00009 #define ES_AUTH_WRONG_PW  -2
00010 #define ES_AUTH_EXPIRED   -3
00011 #define ES_AUTH_LOCKED    -4
00012 #define ES_AUTH_DISABLED  -5
00013 
00014 #define ES_PW_TOO_LONG             -1
00015 #define ES_PW_TOO_SHORT            -2
00016 #define ES_PW_NOT_ENOUGH_CHAR_CLS  -3
00017 
00018 /*
00019  * Hashes the given password with a username as a salt.
00020  */
00021 char *esapi_hash_password(struct esapi_ctx *, const char *);
00022 
00023 /*
00024  * Checks to see if the supplied login is correct.
00025  */
00026 int esapi_login(const char *, const char *);
00027 
00028 /* 
00029  * Checks to see if a password is complex enough.
00030  */
00031 int esapi_verify_password_strength(char *, int, int, int);
00032 
00033 /*
00034  * Adds the given user to the persistence layer.
00035  */
00036 int esapi_add_user(user *);
00037 
00038 /*
00039  * Removes the given user from the persistence layer.
00040  */
00041 int esapi_remove_user(user *);
00042 
00043 #endif
 All Data Structures Files Functions Variables Typedefs Defines