CS::Utility::Checksum::SHA256 Class Reference
Compute a SHA-256 message digest. More...
#include <csutil/sha256.h>
Public Types | |
| typedef CS::Utility::Checksum::Digest< 32 > | Digest |
| A SHA256 digest is 32 unsigned characters (not 0-terminated). | |
Public Member Functions | |
| void | Append (const uint8 *input, size_t length) |
| Used to update the the input data hash. | |
| Digest | Finish () |
| Used to complete the hashing process and obtain the calculated hash. | |
Static Public Member Functions | |
| static Digest | Encode (const void *, size_t nbytes) |
| Encode a buffer. | |
| static Digest | Encode (const char *) |
| Encode a null-terminated string buffer. | |
| static Digest | Encode (csString const &) |
| Encode a string. | |
Detailed Description
Compute a SHA-256 message digest.
This class provides an interface to compute a digest in a "streaming" manner (the message can be split into chunks which are processed sequentially) as well as a convenient interface which allows one to create a digest in a single step.
Definition at line 44 of file sha256.h.
Member Typedef Documentation
Member Function Documentation
| void CS::Utility::Checksum::SHA256::Append | ( | const uint8 * | input, | |
| size_t | length | |||
| ) |
Used to update the the input data hash.
- Parameters:
-
input A pointer to an array of the input data with which to update the hash. length The length of the input data to hash (in bytes).
| static Digest CS::Utility::Checksum::SHA256::Encode | ( | const void * | , | |
| size_t | nbytes | |||
| ) | [static] |
Encode a buffer.
| static Digest CS::Utility::Checksum::SHA256::Encode | ( | const char * | ) | [static] |
Encode a null-terminated string buffer.
| Digest CS::Utility::Checksum::SHA256::Finish | ( | ) |
Used to complete the hashing process and obtain the calculated hash.
After finishing, don't append further data to the hash -- the resulting digest will be bogus.
- Returns:
- The calculated hash.
The documentation for this class was generated from the following file:
- csutil/sha256.h
Generated for Crystal Space 2.0 by doxygen 1.6.1
