diff options
author | stderr64 <linuxwizard@voidnet.dy.fi> | 2023-08-17 21:19:10 +0300 |
---|---|---|
committer | stderr64 <linuxwizard@voidnet.dy.fi> | 2023-08-17 21:19:10 +0300 |
commit | f484331cf374031f68566162f16ba00eedc1b7f0 (patch) | |
tree | c5632b5b7c574bf31642cdec12a409adfbabb31c /auth.h | |
download | CWebHook-f484331cf374031f68566162f16ba00eedc1b7f0.tar.gz CWebHook-f484331cf374031f68566162f16ba00eedc1b7f0.tar.zst |
Recreated repository
Diffstat (limited to 'auth.h')
-rw-r--r-- | auth.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -0,0 +1,10 @@ +#define AUTH_SUCCESS 0 +#define AUTH_FAILED -1 + +int check_password( char *pw, char *correct_pw ){ + if ( pw == NULL || (uint64_t)strlen(pw) <= 0 ) + return AUTH_FAILED; + if ( strcmp((const char*)pw, (const char*)correct_pw) != 0 ) + return AUTH_FAILED; + return AUTH_SUCCESS; +} |