Loading...
Searching...
No Matches
Macros | Functions
as_password.h File Reference
#include <aerospike/as_std.h>
#include <string.h>
+ Include dependency graph for as_password.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define AS_PASSWORD_HASH_SIZE   64
 
#define AS_USER_SIZE   64
 

Functions

AS_EXTERN void as_password_acquire (char *password_trg, const char *password_src, int size)
 
bool as_password_gen_constant_hash (const char *password, char *hash)
 
bool as_password_gen_hash (const char *password, const char *salt, char *hash)
 
bool as_password_gen_salt (char *salt)
 
bool as_password_get_constant_hash (const char *password, char *hash)
 
AS_EXTERN bool as_password_prompt_hash (const char *password, char *hash)
 
static bool as_password_verify (const char *hash1, const char *hash2)
 

Macro Definition Documentation

◆ AS_PASSWORD_HASH_SIZE

#define AS_PASSWORD_HASH_SIZE   64

Size of hash buffer including null byte, padded to 8 byte boundary.

Definition at line 34 of file as_password.h.

◆ AS_USER_SIZE

#define AS_USER_SIZE   64

The user name size including null byte.

Definition at line 29 of file as_password.h.

Function Documentation

◆ as_password_acquire()

AS_EXTERN void as_password_acquire ( char * password_trg,
const char * password_src,
int size )

◆ as_password_gen_constant_hash()

bool as_password_gen_constant_hash ( const char * password,
char * hash )

Create bcrypt hash of password with constant salt. Return true if hash was generated.

◆ as_password_gen_hash()

bool as_password_gen_hash ( const char * password,
const char * salt,
char * hash )

Create bcrypt hash of password. Return true if hash was generated.

◆ as_password_gen_salt()

bool as_password_gen_salt ( char * salt)

Generate random salt value. Return true if salt was generated.

◆ as_password_get_constant_hash()

bool as_password_get_constant_hash ( const char * password,
char * hash )

If the input password is not hashed, convert to bcrypt hashed password. Return true if hash was successful.

◆ as_password_prompt_hash()

AS_EXTERN bool as_password_prompt_hash ( const char * password,
char * hash )

Prompt for input password from command line if input password is empty. If the input password is not hashed, convert to bcrypt hashed password. Return true if hash was successful.

◆ as_password_verify()

static bool as_password_verify ( const char * hash1,
const char * hash2 )
inlinestatic

Verify password hash. Hash length should always be 60. Return true if hashes are equal.

Definition at line 80 of file as_password.h.