|
versadac
1
versadac - Scalable Recorder Firmware
|
SHA-256 implementation. More...
#include <openssl/opensslconf.h>#include <stdlib.h>#include <string.h>#include <openssl/crypto.h>#include <openssl/sha.h>#include <openssl/opensslv.h>#include "md32_common.h"Macros | |
| #define | SHA_LONG_LOG2 2 /* default to 32 bits */ |
| #define | DATA_ORDER_IS_BIG_ENDIAN |
| #define | HASH_LONG SHA_LONG |
| #define | HASH_LONG_LOG2 SHA_LONG_LOG2 |
| #define | HASH_CTX SHA256_CTX |
| #define | HASH_CBLOCK SHA_CBLOCK |
| #define | HASH_LBLOCK SHA_LBLOCK |
| #define | HASH_MAKE_STRING(c, s) |
| #define | HASH_UPDATE SHA256_Update |
| #define | HASH_TRANSFORM SHA256_Transform |
| #define | HASH_FINAL SHA256_Final |
| #define | HASH_BLOCK_HOST_ORDER sha256_block_host_order |
| #define | HASH_BLOCK_DATA_ORDER sha256_block_data_order |
| #define | Sigma0(x) (ROTATE((x),30) ^ ROTATE((x),19) ^ ROTATE((x),10)) |
| #define | Sigma1(x) (ROTATE((x),26) ^ ROTATE((x),21) ^ ROTATE((x),7)) |
| #define | sigma0(x) (ROTATE((x),25) ^ ROTATE((x),14) ^ ((x)>>3)) |
| #define | sigma1(x) (ROTATE((x),15) ^ ROTATE((x),13) ^ ((x)>>10)) |
| #define | Ch(x, y, z) (((x) & (y)) ^ ((~(x)) & (z))) |
| #define | Maj(x, y, z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) |
| #define | ROUND_00_15(i, a, b, c, d, e, f, g, h) |
| #define | ROUND_16_63(i, a, b, c, d, e, f, g, h, X) |
Functions | |
| int | SHA224_Init (SHA256_CTX *c) |
| int | SHA256_Init (SHA256_CTX *c) |
| unsigned char * | SHA224 (const unsigned char *d, size_t n, unsigned char *md) |
| unsigned char * | SHA256 (const unsigned char *d, size_t n, unsigned char *md) |
| int | SHA224_Update (SHA256_CTX *c, const void *data, size_t len) |
| int | SHA224_Final (unsigned char *md, SHA256_CTX *c) |
| void | sha256_block_host_order (SHA256_CTX *ctx, const void *in, size_t num) |
| void | sha256_block_data_order (SHA256_CTX *ctx, const void *in, size_t num) |
| static void | sha256_block (SHA256_CTX *ctx, const void *in, size_t num, int host) |
| void | HASH_BLOCK_HOST_ORDER (SHA256_CTX *ctx, const void *in, size_t num) |
| void | HASH_BLOCK_DATA_ORDER (SHA256_CTX *ctx, const void *in, size_t num) |
Variables | |
| const char | SHA256_version [] ="SHA-256" OPENSSL_VERSION_PTEXT |
| static const SHA_LONG | K256 [64] |
SHA-256 implementation.
| #define HASH_MAKE_STRING | ( | c, | |
| s | |||
| ) |
| #define ROUND_00_15 | ( | i, | |
| a, | |||
| b, | |||
| c, | |||
| d, | |||
| e, | |||
| f, | |||
| g, | |||
| h | |||
| ) |
| #define ROUND_16_63 | ( | i, | |
| a, | |||
| b, | |||
| c, | |||
| d, | |||
| e, | |||
| f, | |||
| g, | |||
| h, | |||
| X | |||
| ) |
|
static |
1.8.9.1