Rev 16 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 16 | Rev 38 | ||
|---|---|---|---|
| Line 256... | Line 256... | ||
| 256 | #undef SHA512_SHORT_BLOCK_LENGTH |
256 | #undef SHA512_SHORT_BLOCK_LENGTH |
| 257 | return; |
257 | return; |
| 258 | } |
258 | } |
| 259 | 259 | ||
| 260 | 260 | ||
| 261 |
|
261 | const char *SHA512 (void *data, size_t data_len, uint8_t *digest_or_NULL) |
| 262 | { |
262 | { |
| 263 | // computes the SHA-512 hash of a block of data in one pass and write it to digest, or to a static buffer if NULL |
263 | // computes the SHA-512 hash of a block of data in one pass and write it to digest, or to a static buffer if NULL |
| 264 | // returns the STRING REPRESENTATION of digest in a statically-allocated string |
264 | // returns the STRING REPRESENTATION of digest in a statically-allocated string |
| 265 | 265 | ||
| 266 | static thread_local uint8_t static_digest[SHA512_DIGEST_LENGTH] = ""; |
266 | static thread_local uint8_t static_digest[SHA512_DIGEST_LENGTH] = ""; |