server/src/util/password.c
2016-07-13 19:10:22 +02:00

18 lines
406 B
C

#include <platform.h>
#include "password.h"
#include <assert.h>
#include <string.h>
#include <stdio.h>
bool password_is_implemented(int algo) {
return algo == PASSWORD_PLAINTEXT;
}
const char * password_encode(const char * passwd, int algo) {
return passwd;
}
int password_verify(const char * pwhash, const char * passwd) {
return (strcmp(passwd, pwhash) == 0) ? VERIFY_OK : VERIFY_FAIL;
}