hash.h File Reference
Generic interface for hashing algorithms. More...
Go to the source code of this file.
Functions | |
| void | hash_begin (Hash *h) |
| Initialize a hash computation. | |
| void | hash_update (Hash *h, const void *data, size_t len) |
| Add some data to the computation. | |
| uint8_t * | hash_final (Hash *h) |
| Finalize the hash computation and return the digest. | |
| int | hash_digest_len (Hash *h) |
| Return the digest length in bytes. | |
Detailed Description
Generic interface for hashing algorithms.
Definition in file hash.h.
Function Documentation
| uint8_t* hash_final | ( | Hash * | h | ) | [inline] |
Finalize the hash computation and return the digest.
- Note:
- This function must be called exactly once per each computation. Calling it twice leads to undefined behaviour.
- The pointer returned is within the hash context structure h, so it has the same lifetime as the hash instance. The data will be invalidated as soon as hash_begin is called again on the same instance.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/bertos_logo.png)