|
Ruby
2.7.2p137(2020-10-01revision5445e0435260b449decf2ac16f9d09bae3cafe72)
|
#include <sys/types.h>Go to the source code of this file.
Data Structures | |
| struct | _SHA256_CTX |
| struct | _SHA512_CTX |
Macros | |
| #define | SHA256_BLOCK_LENGTH 64 |
| #define | SHA256_DIGEST_LENGTH 32 |
| #define | SHA256_DIGEST_STRING_LENGTH (SHA256_DIGEST_LENGTH * 2 + 1) |
| #define | SHA384_BLOCK_LENGTH 128 |
| #define | SHA384_DIGEST_LENGTH 48 |
| #define | SHA384_DIGEST_STRING_LENGTH (SHA384_DIGEST_LENGTH * 2 + 1) |
| #define | SHA512_BLOCK_LENGTH 128 |
| #define | SHA512_DIGEST_LENGTH 64 |
| #define | SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1) |
Typedefs | |
| typedef unsigned char | uint8_t |
| typedef unsigned int | uint32_t |
| typedef unsigned long long | uint64_t |
| typedef struct _SHA256_CTX | SHA256_CTX |
| typedef struct _SHA512_CTX | SHA512_CTX |
| typedef SHA512_CTX | SHA384_CTX |
Functions | |
| int | SHA256_Init (SHA256_CTX *) |
| void | SHA256_Update (SHA256_CTX *, const uint8_t *, size_t) |
| int | SHA256_Final (uint8_t[SHA256_DIGEST_LENGTH], SHA256_CTX *) |
| char * | SHA256_End (SHA256_CTX *, char[SHA256_DIGEST_STRING_LENGTH]) |
| char * | SHA256_Data (const uint8_t *, size_t, char[SHA256_DIGEST_STRING_LENGTH]) |
| int | SHA384_Init (SHA384_CTX *) |
| void | SHA384_Update (SHA384_CTX *, const uint8_t *, size_t) |
| int | SHA384_Final (uint8_t[SHA384_DIGEST_LENGTH], SHA384_CTX *) |
| char * | SHA384_End (SHA384_CTX *, char[SHA384_DIGEST_STRING_LENGTH]) |
| char * | SHA384_Data (const uint8_t *, size_t, char[SHA384_DIGEST_STRING_LENGTH]) |
| int | SHA512_Init (SHA512_CTX *) |
| void | SHA512_Update (SHA512_CTX *, const uint8_t *, size_t) |
| int | SHA512_Final (uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX *) |
| char * | SHA512_End (SHA512_CTX *, char[SHA512_DIGEST_STRING_LENGTH]) |
| char * | SHA512_Data (const uint8_t *, size_t, char[SHA512_DIGEST_STRING_LENGTH]) |
| #define SHA256_DIGEST_STRING_LENGTH (SHA256_DIGEST_LENGTH * 2 + 1) |
| #define SHA384_DIGEST_STRING_LENGTH (SHA384_DIGEST_LENGTH * 2 + 1) |
| #define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1) |
| typedef struct _SHA256_CTX SHA256_CTX |
| typedef SHA512_CTX SHA384_CTX |
| typedef struct _SHA512_CTX SHA512_CTX |
Definition at line 665 of file sha2.c.
References len, SHA256_End(), SHA256_Init(), and SHA256_Update().
| char* SHA256_End | ( | SHA256_CTX * | , |
| char | [SHA256_DIGEST_STRING_LENGTH] | ||
| ) |
| int SHA256_Final | ( | uint8_t | [SHA256_DIGEST_LENGTH], |
| SHA256_CTX * | |||
| ) |
| int SHA256_Init | ( | SHA256_CTX * | ) |
Definition at line 344 of file sha2.c.
References MEMCPY_BCOPY, and _SHA256_CTX::state.
Referenced by SHA256_Data().
| void SHA256_Update | ( | SHA256_CTX * | , |
| const uint8_t * | , | ||
| size_t | |||
| ) |
Definition at line 529 of file sha2.c.
References assert, _SHA256_CTX::bitcount, _SHA256_CTX::buffer, int, len, MEMCPY_BCOPY, SHA256_BLOCK_LENGTH, and SHA256_Transform().
Referenced by SHA256_Data().
Definition at line 1074 of file sha2.c.
References len, SHA384_End(), SHA384_Init(), and SHA384_Update().
| char* SHA384_End | ( | SHA384_CTX * | , |
| char | [SHA384_DIGEST_STRING_LENGTH] | ||
| ) |
| int SHA384_Final | ( | uint8_t | [SHA384_DIGEST_LENGTH], |
| SHA384_CTX * | |||
| ) |
| int SHA384_Init | ( | SHA384_CTX * | ) |
Definition at line 1008 of file sha2.c.
References MEMCPY_BCOPY, and _SHA512_CTX::state.
Referenced by SHA384_Data().
| void SHA384_Update | ( | SHA384_CTX * | , |
| const uint8_t * | , | ||
| size_t | |||
| ) |
Definition at line 1018 of file sha2.c.
References len, and SHA512_Update().
Referenced by SHA384_Data().
Definition at line 998 of file sha2.c.
References len, SHA512_End(), SHA512_Init(), and SHA512_Update().
| char* SHA512_End | ( | SHA512_CTX * | , |
| char | [SHA512_DIGEST_STRING_LENGTH] | ||
| ) |
| int SHA512_Final | ( | uint8_t | [SHA512_DIGEST_LENGTH], |
| SHA512_CTX * | |||
| ) |
| int SHA512_Init | ( | SHA512_CTX * | ) |
Definition at line 675 of file sha2.c.
References MEMCPY_BCOPY, and _SHA512_CTX::state.
Referenced by SHA512_Data().
| void SHA512_Update | ( | SHA512_CTX * | , |
| const uint8_t * | , | ||
| size_t | |||
| ) |
Definition at line 854 of file sha2.c.
References ADDINC128, assert, _SHA512_CTX::bitcount, _SHA512_CTX::buffer, int, len, MEMCPY_BCOPY, SHA512_BLOCK_LENGTH, and SHA512_Transform().
Referenced by SHA384_Update(), and SHA512_Data().