summaryrefslogtreecommitdiff
path: root/auth.h
blob: 0e5c0ea1068df7b8fdb3592dbb9b867c80edb6a4 (about) (plain)
1
2
3
4
5
6
7
8
9
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;
}