Add scrypt library and scrypt support to auth
[blerg.git] / common / auth.h
index 647bd6f..651813f 100644 (file)
@@ -4,8 +4,18 @@
 #ifndef _AUTH_H
 #define _AUTH_H
 
+#define TOKEN_SIZE 16
+#define MAX_PASSWORD_LENGTH 64
+#define SCRYPT_SALT_SIZE 8
+#define SCRYPT_OUTPUT_SIZE 32
+#define SCRYPT_N 1<<14
+#define SCRYPT_r 8
+#define SCRYPT_p 1
+
 int auth_set_password(const char *, const char *);
+int auth_get_password_version(const char *);
 int auth_get_password(const char *, char *);
+int auth_get_salt(const char *, char *);
 int auth_check_password(const char *, const char *);
 char * auth_login(const char *username, const char *password);
 int auth_logout(const char *username, const char *token);