7#define AES_BLOCK_SIZE 16
9#define SHA256_DIGEST_SIZE 32
12 char **out,
size_t *out_len);
14 char **out,
size_t *out_len);
bool are_hash_equals(const u8 *h1, const u8 *h2)
Compares two SHA-256 hashes for equality.
int hash_string(const char *input, u8 *digest)
Hashes a string using SHA-256.
int encrypt_buffer(const char *in, size_t in_len, char **out, size_t *out_len)
Encrypts a buffer using AES-128 in CBC mode.
int decrypt_buffer(const char *in, size_t in_len, char **out, size_t *out_len)
Decrypts a buffer using AES-128 in CBC mode.
void hash_to_str(const u8 *digest, char *output)
Converts a SHA-256 hash to a hexadecimal string.