2016-01-12 23:52:30 +01:00
|
|
|
#include <platform.h>
|
|
|
|
#include "password.h"
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdio.h>
|
2016-01-13 14:41:09 +01:00
|
|
|
|
2016-02-25 10:46:46 +01:00
|
|
|
bool password_is_implemented(int algo) {
|
2016-07-13 19:10:22 +02:00
|
|
|
return algo == PASSWORD_PLAINTEXT;
|
2016-01-12 23:52:30 +01:00
|
|
|
}
|
|
|
|
|
2016-02-16 07:30:26 +01:00
|
|
|
const char * password_encode(const char * passwd, int algo) {
|
2016-07-13 19:10:22 +02:00
|
|
|
return passwd;
|
2016-01-13 14:41:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
int password_verify(const char * pwhash, const char * passwd) {
|
2016-07-13 19:10:22 +02:00
|
|
|
return (strcmp(passwd, pwhash) == 0) ? VERIFY_OK : VERIFY_FAIL;
|
2016-01-12 23:52:30 +01:00
|
|
|
}
|