18 e += ((
a << 5) | (
a >> 27)) +
f + k + w;
19 b = (
b << 30) | (
b >> 2);
23 return d ^ (
b & (
c ^ d));
29 return (
b &
c) | (d & (
b |
c));
33 return (x << 1) | (x >> 31);
37 inline void Initialize(
uint32_t *s) {
52 uint32_t a = s[0],
b = s[1],
c = s[2], d = s[3],
e = s[4];
53 uint32_t w0,
w1,
w2,
w3,
w4,
w5,
w6,
w7,
w8,
w9,
w10,
w11,
w12,
w13,
166 sha1::Transform(
s,
buf);
169 while (end - data >= 64) {
171 sha1::Transform(
s, data);
184 static const uint8_t pad[64] = {0x80};
static const uint8_t k1[32]
static const uint8_t k2[32]
void Finalize(uint8_t hash[OUTPUT_SIZE])
CSHA1 & Write(const uint8_t *data, size_t len)
static void WriteBE64(uint8_t *ptr, uint64_t x)
static void WriteBE32(uint8_t *ptr, uint32_t x)
static uint32_t ReadBE32(const uint8_t *ptr)
#define Round(a, b, c, d, e, f, g, h, k, w)
Internal SHA-1 implementation.
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...