![]() |
EpiRootkit
By STDBOOL
|
#include <crypto/hash.h>#include <linux/crypto.h>#include <linux/err.h>#include <linux/slab.h>#include <linux/string.h>#include "crypto.h"Go to the source code of this file.
Functions | |
| 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 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.