MCCI TweetNaCl
TweetNaCl library adapted for embedded use
|
Data Structures | |
struct | mcci_tweetnacl_sha512_t |
abstract type for SHA512 signature blocks More... | |
Functions | |
static void | mcci_tweetnacl_hash_sha512 (mcci_tweetnacl_sha512_t *pOut, const unsigned char *pMessage, size_t nMessage) |
Calculate sha512 hash of message. More... | |
static size_t | mcci_tweetnacl_hashblocks_sha512 (mcci_tweetnacl_sha512_t *pState, const unsigned char *pMessage, size_t nMessage) |
Partial calculation of sha512 hash of message. More... | |
static void | mcci_tweetnacl_hashblocks_sha512_finish (mcci_tweetnacl_sha512_t *pHash, const unsigned char *pMessage, size_t nMessage) |
Finish partial calculation of sha512 hash of message. More... | |
static void | mcci_tweetnacl_hashblocks_sha512_init (mcci_tweetnacl_sha512_t *pState) |
Partial calculation of sha512 hash of message. More... | |
|
inlinestatic |
Calculate sha512 hash of message.
[out] | pOut | is set to the signature |
[in] | pMessage | is the message to be hashed |
[in] | nMessage | is the length of the message in bytes |
Definition at line 76 of file mcci_tweetnacl_hash.h.
|
inlinestatic |
Partial calculation of sha512 hash of message.
[in,out] | pState | carries the current state |
[in] | pMessage | is the message to be hashed |
[in] | nMessage | is the length of the message in bytes |
Definition at line 97 of file mcci_tweetnacl_hash.h.
|
inlinestatic |
Finish partial calculation of sha512 hash of message.
[in,out] | pHash | carries the current state |
[in] | pMessage | is the message to be hashed |
[in] | nMessage | is the length of the message in bytes |
SHA512 processes the message in 128-byte chunks. To accomodate variable-length text, SHA512 always appends some bytes, containing enough info to unambigiously represent the size of the message, even though its padding. This routine does that, assuming that all but nMessage % 128 bytes have already been incorporated in the hash.
Definition at line 144 of file mcci_tweetnacl_hash.h.
|
inlinestatic |
Partial calculation of sha512 hash of message.
[out] | pState | is set to the initialization vector |
Definition at line 118 of file mcci_tweetnacl_hash.h.