![]() |
Fun 0.41.5
The programming language that makes you have fun!
|
OpenSSL-based hashing helpers used by crypto-related opcodes. More...
#include <openssl/evp.h>#include <stdlib.h>Go to the source code of this file.
Functions | |
| int | EVP_MD_get_size (const EVP_MD *md) |
| static char * | fun_openssl_md5_hex (const unsigned char *data, size_t len) |
| Compute MD5 digest and return it as a lowercase hex string. | |
| static char * | fun_openssl_sha256_hex (const unsigned char *data, size_t len) |
| Compute SHA-256 digest and return it as a lowercase hex string. | |
| static char * | fun_openssl_sha512_hex (const unsigned char *data, size_t len) |
| Compute SHA-512 digest and return it as a lowercase hex string. | |
| static char * | fun_openssl_ripemd160_hex (const unsigned char *data, size_t len) |
| Compute RIPEMD-160 digest and return it as a lowercase hex string. | |
OpenSSL-based hashing helpers used by crypto-related opcodes.
Provides thin wrappers around OpenSSL EVP routines to compute common digests (MD5, RIPEMD-160, SHA-256, SHA-512). When FUN_WITH_OPENSSL is disabled, these helpers fall back to returning empty strings to keep the VM behavior consistent.
Definition in file openssl.c.
| int EVP_MD_get_size | ( | const EVP_MD * | md | ) |
|
static |
Compute MD5 digest and return it as a lowercase hex string.
| data | Pointer to input bytes (may be NULL if len==0). |
| len | Number of input bytes. |
|
static |
Compute RIPEMD-160 digest and return it as a lowercase hex string.
On some OpenSSL builds (e.g., 3.x without legacy provider), RIPEMD-160 may be unavailable and EVP_ripemd160() can return NULL.
| data | Pointer to input bytes (may be NULL if len==0). |
| len | Number of input bytes. |
|
static |
Compute SHA-256 digest and return it as a lowercase hex string.
| data | Pointer to input bytes (may be NULL if len==0). |
| len | Number of input bytes. |
|
static |
Compute SHA-512 digest and return it as a lowercase hex string.
| data | Pointer to input bytes (may be NULL if len==0). |
| len | Number of input bytes. |