Bitcoin Core
21.99.0
P2P Digital Currency
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 <stdint.h>
11
#include <stdlib.h>
12
14
class
CHKDF_HMAC_SHA256_L32
15
{
16
private
:
17
unsigned
char
m_prk
[32];
18
static
const
size_t
OUTPUT_SIZE
= 32;
19
20
public
:
21
CHKDF_HMAC_SHA256_L32
(
const
unsigned
char
* ikm,
size_t
ikmlen,
const
std::string& salt);
22
void
Expand32
(
const
std::string& info,
unsigned
char
hash[
OUTPUT_SIZE
]);
23
};
24
25
#endif // BITCOIN_CRYPTO_HKDF_SHA256_32_H
CHKDF_HMAC_SHA256_L32::OUTPUT_SIZE
static const size_t OUTPUT_SIZE
Definition:
hkdf_sha256_32.h:18
hmac_sha256.h
CHKDF_HMAC_SHA256_L32::Expand32
void Expand32(const std::string &info, unsigned char hash[OUTPUT_SIZE])
Definition:
hkdf_sha256_32.cpp:15
CHKDF_HMAC_SHA256_L32::CHKDF_HMAC_SHA256_L32
CHKDF_HMAC_SHA256_L32(const unsigned char *ikm, size_t ikmlen, const std::string &salt)
Definition:
hkdf_sha256_32.cpp:10
CHKDF_HMAC_SHA256_L32::m_prk
unsigned char m_prk[32]
Definition:
hkdf_sha256_32.h:17
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:14
Generated on Fri Apr 9 2021 20:04:19 for Bitcoin Core by
1.8.17