From f484331cf374031f68566162f16ba00eedc1b7f0 Mon Sep 17 00:00:00 2001 From: stderr64 Date: Thu, 17 Aug 2023 21:19:10 +0300 Subject: Recreated repository --- auth.h | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 auth.h (limited to 'auth.h') diff --git a/auth.h b/auth.h new file mode 100644 index 0000000..0e5c0ea --- /dev/null +++ b/auth.h @@ -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; +} -- cgit v1.2.3-86-g962b