server/src/util/password.h
Enno Rehling 4e5f1d05ce Be very strict about C standards.
Compile with -std=c89 in gcc.
remove all // comments (they are nice, but unnecessary).
variables only declared at start of block.
various pedantery.
backwards compatible va_copy for pre-C99 gcc.
2017-02-18 21:15:14 +01:00

12 lines
335 B
C

#pragma once
#include <stdbool.h>
#define PASSWORD_PLAINTEXT 0
#define PASSWORD_DEFAULT PASSWORD_PLAINTEXT
#define VERIFY_OK 0
#define VERIFY_FAIL 1
#define VERIFY_UNKNOWN 2
int password_verify(const char *hash, const char *passwd);
const char * password_encode(const char *passwd, int algo);
bool password_is_implemented(int algo);