Bitcoin ABC
0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
src
crypto
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
17
class
CHKDF_HMAC_SHA256_L32
{
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
CHKDF_HMAC_SHA256_L32
A rfc5869 HKDF implementation with HMAC_SHA256 and fixed key output length of 32 bytes (L=32)
Definition
hkdf_sha256_32.h:17
CHKDF_HMAC_SHA256_L32::Expand32
void Expand32(const std::string &info, uint8_t hash[OUTPUT_SIZE])
Definition
hkdf_sha256_32.cpp:17
CHKDF_HMAC_SHA256_L32::m_prk
uint8_t m_prk[32]
Definition
hkdf_sha256_32.h:19
CHKDF_HMAC_SHA256_L32::OUTPUT_SIZE
static const size_t OUTPUT_SIZE
Definition
hkdf_sha256_32.h:20
hmac_sha256.h
GetRand
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
Generated on Sat Nov 23 2024 02:37:58 for Bitcoin ABC by
1.9.8