#include <openssl/opensslconf.h>
#include <stdlib.h>
#include <string.h>
#include <openssl/crypto.h>
#include <openssl/sha.h>
#include <openssl/opensslv.h>
#include "cryptlib.h"
Go to the source code of this file.
Macros | |
#define | B(x, j) (((SHA_LONG64)(*(((const unsigned char *)(&x))+j)))<<((7-j)*8)) |
#define | PULL64(x) (B(x,0)|B(x,1)|B(x,2)|B(x,3)|B(x,4)|B(x,5)|B(x,6)|B(x,7)) |
#define | ROTR(x, s) (((x)>>s) | (x)<<(64-s)) |
#define | Sigma0(x) (ROTR((x),28) ^ ROTR((x),34) ^ ROTR((x),39)) |
#define | Sigma1(x) (ROTR((x),14) ^ ROTR((x),18) ^ ROTR((x),41)) |
#define | sigma0(x) (ROTR((x),1) ^ ROTR((x),8) ^ ((x)>>7)) |
#define | sigma1(x) (ROTR((x),19) ^ ROTR((x),61) ^ ((x)>>6)) |
#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_80(i, j, a, b, c, d, e, f, g, h, X) |
Functions | |
fips_md_init_ctx (SHA384, SHA512) | |
fips_md_init (SHA512) | |
int | SHA512_Final (unsigned char *md, SHA512_CTX *c) |
int | SHA384_Final (unsigned char *md, SHA512_CTX *c) |
int | SHA512_Update (SHA512_CTX *c, const void *_data, size_t len) |
int | SHA384_Update (SHA512_CTX *c, const void *data, size_t len) |
void | SHA512_Transform (SHA512_CTX *c, const unsigned char *data) |
unsigned char * | SHA384 (const unsigned char *d, size_t n, unsigned char *md) |
unsigned char * | SHA512 (const unsigned char *d, size_t n, unsigned char *md) |
Variables | |
const char | SHA512_version [] ="SHA-512" OPENSSL_VERSION_PTEXT |
#define B | ( | x, | |
j | |||
) | (((SHA_LONG64)(*(((const unsigned char *)(&x))+j)))<<((7-j)*8)) |
#define Maj | ( | x, | |
y, | |||
z | |||
) | (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) |
unsigned char* SHA384 | ( | const unsigned char * | d, |
size_t | n, | ||
unsigned char * | md | ||
) |
int SHA384_Final | ( | unsigned char * | md, |
SHA512_CTX * | c | ||
) |
int SHA384_Update | ( | SHA512_CTX * | c, |
const void * | data, | ||
size_t | len | ||
) |
unsigned char* SHA512 | ( | const unsigned char * | d, |
size_t | n, | ||
unsigned char * | md | ||
) |
int SHA512_Final | ( | unsigned char * | md, |
SHA512_CTX * | c | ||
) |
void SHA512_Transform | ( | SHA512_CTX * | c, |
const unsigned char * | data | ||
) |
int SHA512_Update | ( | SHA512_CTX * | c, |
const void * | _data, | ||
size_t | len | ||
) |