LLVM 22.0.0git
|
A class that wrap the SHA1 algorithm. More...
#include "llvm/Support/SHA1.h"
Public Member Functions | |
SHA1 () | |
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, 20 > | final () |
Return the current raw 160-bits SHA1 for the digested data since the last call to init(). | |
LLVM_ABI std::array< uint8_t, 20 > | result () |
Return the current raw 160-bits SHA1 for the digested data since the last call to init(). |
Static Public Member Functions | |
static LLVM_ABI std::array< uint8_t, 20 > | hash (ArrayRef< uint8_t > Data) |
Returns a raw 160-bit SHA1 hash for the given data. |
|
inline |
std::array< uint8_t, 20 > SHA1::final | ( | ) |
void SHA1::init | ( | ) |
std::array< uint8_t, 20 > SHA1::result | ( | ) |
Return the current raw 160-bits SHA1 for the digested data since the last call to init().
This is suitable for getting the SHA1 at any time without invalidating the internal state so that more calls can be made into update.
Definition at line 288 of file SHA1.cpp.
Referenced by llvm::computeLTOCacheKey(), and llvm::recomputeLTOCacheKey().
Digest more data.
Definition at line 208 of file SHA1.cpp.
References assert(), C, llvm::Data, I, and llvm::support::endian::read32be().
Referenced by llvm::computeLTOCacheKey(), hash(), llvm::recomputeLTOCacheKey(), and update().
void SHA1::update | ( | StringRef | Str | ) |
union { ... } llvm::SHA1::Buffer |