Bitcoin Core
32.99.0
P2P Digital Currency
Loading...
Searching...
No Matches
src
crypto
hkdf_sha256_32.h
Go to the documentation of this file.
1
// Copyright (c) 2018-present 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 <cstddef>
9
#include <string>
10
12
class
CHKDF_HMAC_SHA256_L32
13
{
14
private
:
15
unsigned
char
m_prk
[32];
16
static
constexpr
size_t
OUTPUT_SIZE
{32};
17
18
public
:
19
CHKDF_HMAC_SHA256_L32
(
const
unsigned
char
*
ikm
,
size_t
ikmlen
,
const
std::string&
salt
);
20
void
Expand32
(
const
std::string& info,
unsigned
char
hash[
OUTPUT_SIZE
]);
21
};
22
23
#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:13
CHKDF_HMAC_SHA256_L32::OUTPUT_SIZE
static constexpr size_t OUTPUT_SIZE
Definition
hkdf_sha256_32.h:16
CHKDF_HMAC_SHA256_L32::Expand32
void Expand32(const std::string &info, unsigned char hash[OUTPUT_SIZE])
Definition
hkdf_sha256_32.cpp:16
CHKDF_HMAC_SHA256_L32::m_prk
unsigned char m_prk[32]
Definition
hkdf_sha256_32.h:15
Ticks
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.
Definition
time.h:82
Generated on Wed Oct 21 2026 20:05:11 for Bitcoin Core by
1.9.8