Bitcoin ABC  0.22.13
P2P Digital Currency
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 
8 #include <crypto/hmac_sha256.h>
9 
10 #include <cstdint>
11 #include <cstdlib>
12 
18 private:
19  uint8_t m_prk[32];
20  static const size_t OUTPUT_SIZE = 32;
21 
22 public:
23  CHKDF_HMAC_SHA256_L32(const uint8_t *ikm, size_t ikmlen,
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
void Expand32(const std::string &info, uint8_t hash[OUTPUT_SIZE])
static const size_t OUTPUT_SIZE
A rfc5869 HKDF implementation with HMAC_SHA256 and fixed key output length of 32 bytes (L=32) ...
CHKDF_HMAC_SHA256_L32(const uint8_t *ikm, size_t ikmlen, const std::string &salt)