96#define UDIF_CRYPTO_PHASH_CPU_COST 4U
102#define UDIF_CRYPTO_PHASH_MEMORY_COST 1U
UDIF_EXPORT_API void udif_crypto_generate_hash_code(uint8_t *output, const uint8_t *message, size_t msglen)
Hash a message and write the resulting hash to an output array.
Definition crypto.c:143
UDIF_EXPORT_API void udif_crypto_generate_application_salt(uint8_t *output, size_t outlen)
Generate a user-unique application salt from OS sources.
Definition crypto.c:123
UDIF_EXPORT_API bool udif_crypto_password_verify(const uint8_t *username, size_t userlen, const uint8_t *password, size_t passlen, const uint8_t *hash, size_t hashlen)
Verify a password against a stored hash.
Definition crypto.c:237
UDIF_EXPORT_API void udif_crypto_hash_password(uint8_t *output, size_t outlen, const uint8_t *username, size_t userlen, const uint8_t *password, size_t passlen)
Hash a password and user name.
Definition crypto.c:170
UDIF_EXPORT_API void udif_crypto_secure_memory_deallocate(uint8_t *block, size_t length)
Release an allocated block of secure memory.
Definition crypto.c:31
UDIF_EXPORT_API void udif_crypto_generate_application_keychain(uint8_t *seed, size_t seedlen, const char *password, size_t passlen, const char *username, size_t userlen)
Generate a secure application key chain.
Definition crypto.c:44
UDIF_EXPORT_API bool udif_crypto_decrypt_stream(uint8_t *output, const uint8_t *seed, const uint8_t *input, size_t length)
Decrypt a stream of bytes.
Definition crypto.c:69
UDIF_EXPORT_API bool udif_crypto_password_minimum_check(const char *password, size_t passlen)
Check a password for a minimum secure threshold.
Definition crypto.c:188
UDIF_EXPORT_API void udif_crypto_generate_mac_code(uint8_t *output, size_t outlen, const uint8_t *message, size_t msglen, const uint8_t *key, size_t keylen)
Compute a MAC (Message Authentication Code) for a message.
Definition crypto.c:155
UDIF_EXPORT_API uint8_t * udif_crypto_secure_memory_allocate(size_t length)
Allocate a block of secure memory.
Definition crypto.c:10
UDIF_EXPORT_API void udif_crypto_encrypt_stream(uint8_t *output, const uint8_t *seed, const uint8_t *input, size_t length)
Encrypt a stream of bytes.
Definition crypto.c:99
UDIF Common Definitions and Protocol Configuration.
UDIF common definitions and constants.
#define UDIF_EXPORT_API
The api export prefix.
Definition udifcommon.h:103