LLVM 22.0.0git
|
#include "llvm/Support/SHA256.h"
Public Member Functions | |
SHA256 () | |
LLVM_ABI void | init () |
Reinitialize the internal state. | |
LLVM_ABI void | update (ArrayRef< uint8_t > Data) |
Digest more data. | |
LLVM_ABI void | update (StringRef Str) |
Digest more data. | |
LLVM_ABI std::array< uint8_t, 32 > | final () |
Return the current raw 256-bits SHA256 for the digested data since the last call to init(). | |
LLVM_ABI std::array< uint8_t, 32 > | result () |
Return the current raw 256-bits SHA256 for the digested data since the last call to init(). |
Static Public Member Functions | |
static LLVM_ABI std::array< uint8_t, 32 > | hash (ArrayRef< uint8_t > Data) |
Returns a raw 256-bit SHA256 hash for the given data. |
|
inlineexplicit |
std::array< uint8_t, 32 > llvm::SHA256::final | ( | ) |
Returns a raw 256-bit SHA256 hash for the given data.
Definition at line 280 of file SHA256.cpp.
References llvm::Data, final(), SHA256(), and update().
void llvm::SHA256::init | ( | ) |
std::array< uint8_t, 32 > llvm::SHA256::result | ( | ) |
Return the current raw 256-bits SHA256 for the digested data since the last call to init().
This is suitable for getting the SHA256 at any time without invalidating the internal state so that more calls can be made into update.
Definition at line 268 of file SHA256.cpp.
Digest more data.
Definition at line 187 of file SHA256.cpp.
References assert(), C, llvm::Data, I, and llvm::support::endian::read32be().
void llvm::SHA256::update | ( | StringRef | Str | ) |
union { ... } llvm::SHA256::Buffer |
uint8_t llvm::SHA256::C[BLOCK_LENGTH] |