LLVM
8.0.1
|
A class that wrap the SHA1 algorithm. More...
#include "llvm/Support/SHA1.h"
Public Member Functions | |
SHA1 () | |
void | init () |
Reinitialize the internal state. More... | |
void | update (ArrayRef< uint8_t > Data) |
Digest more data. More... | |
void | update (StringRef Str) |
Digest more data. More... | |
StringRef | final () |
Return a reference to the current raw 160-bits SHA1 for the digested data since the last call to init(). More... | |
StringRef | result () |
Return a reference to the current raw 160-bits SHA1 for the digested data since the last call to init(). More... | |
Static Public Member Functions | |
static std::array< uint8_t, 20 > | hash (ArrayRef< uint8_t > Data) |
Returns a raw 160-bit SHA1 hash for the given data. More... | |
|
inline |
Definition at line 31 of file SHA1.h.
References llvm::Data, init(), and update().
StringRef SHA1::final | ( | ) |
Return a reference to the current raw 160-bits SHA1 for the digested data since the last call to init().
This call will add data to the internal state and as such is not suited for getting an intermediate result (see result()).
Definition at line 238 of file SHA1.cpp.
Referenced by hash(), and llvm::codeview::GloballyHashedType::hashType().
|
static |
Returns a raw 160-bit SHA1 hash for the given data.
Definition at line 273 of file SHA1.cpp.
References llvm::StringRef::data(), final(), llvm::Intrinsic::memcpy, llvm::StringRef::size(), and update().
Referenced by update().
void SHA1::init | ( | ) |
StringRef SHA1::result | ( | ) |
Return a reference to 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 261 of file SHA1.cpp.
Referenced by llvm::computeLTOCacheKey(), llvm::raw_sha1_ostream::sha1(), and update().
void SHA1::update | ( | ArrayRef< uint8_t > | Data | ) |
Digest more data.
Definition at line 213 of file SHA1.cpp.
References C.
Referenced by llvm::computeLTOCacheKey(), hash(), llvm::codeview::GloballyHashedType::hashType(), SHA1(), and update().
|
inline |
Digest more data.
Definition at line 40 of file SHA1.h.
References llvm::StringRef::data(), hash(), result(), llvm::StringRef::size(), and update().
union { ... } llvm::SHA1::Buffer |
uint8_t llvm::SHA1::C[BLOCK_LENGTH] |