![]() |
EpiRootkit
By STDBOOL
|
Go to the source code of this file.
Macros | |
| #define | AES_BLOCK_SIZE 16 |
| #define | SHA256_DIGEST_SIZE 32 |
Functions | |
| 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. | |
| int | hash_string (const char *input, u8 *digest) |
| Hashes a string using SHA-256. | |
| bool | are_hash_equals (const u8 *h1, const u8 *h2) |
| Compares two SHA-256 hashes for equality. | |
| void | hash_to_str (const u8 *digest, char *output) |
| Converts a SHA-256 hash to a hexadecimal string. | |
| bool are_hash_equals | ( | const u8 * | h1, |
| const u8 * | h2 | ||
| ) |
| 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.
| in | Input buffer to decrypt. |
| in_len | Length of the input buffer. |
| out | Pointer to the output buffer (allocated within the function). |
| out_len | Pointer to the length of the output buffer. |
Definition at line 335 of file aes.c.
| 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.
| in | Input buffer to encrypt. |
| in_len | Length of the input buffer. |
| out | Pointer to the output buffer (allocated within the function). |
| out_len | Pointer to the length of the output buffer. |
| int hash_string | ( | const char * | input, |
| u8 * | digest | ||
| ) |
Hashes a string using SHA-256.
| input | Input string to hash. |
| digest | Output buffer for the hash (must be at least SHA256_DIGEST_SIZE bytes). |
Definition at line 17 of file hash.c.
| void hash_to_str | ( | const u8 * | digest, |
| char * | output | ||
| ) |
Converts a SHA-256 hash to a hexadecimal string.
| digest | Input hash to convert. |
| output | Output buffer for the hexadecimal string (must be at least SHA256_DIGEST_SIZE * 2 + 1 bytes). |
Definition at line 74 of file hash.c.