Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
hkdf_sha256_32.h
Go to the documentation of this file.
1// Copyright (c) 2018 The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_CRYPTO_HKDF_SHA256_32_H
6#define BITCOIN_CRYPTO_HKDF_SHA256_32_H
7
9
10#include <cstdint>
11#include <cstdlib>
12
18private:
20 static const size_t OUTPUT_SIZE = 32;
21
22public:
24 const std::string &salt);
25 void Expand32(const std::string &info, uint8_t hash[OUTPUT_SIZE]);
26};
27
28#endif // BITCOIN_CRYPTO_HKDF_SHA256_32_H
A rfc5869 HKDF implementation with HMAC_SHA256 and fixed key output length of 32 bytes (L=32)
void Expand32(const std::string &info, uint8_t hash[OUTPUT_SIZE])
static const size_t OUTPUT_SIZE
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...
Definition random.h:85