PIVX Core
5.6.99
P2P Digital Currency
src
crypto
rfc6979_hmac_sha256.h
Go to the documentation of this file.
1
// Copyright (c) 2014 The Bitcoin 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 PIVX_CRYPTO_RFC6979_HMAC_SHA256_H
6
#define PIVX_CRYPTO_RFC6979_HMAC_SHA256_H
7
8
#include "
crypto/hmac_sha256.h
"
9
10
#include <stdint.h>
11
#include <stdlib.h>
12
14
class
RFC6979_HMAC_SHA256
15
{
16
private
:
17
unsigned
char
V
[
CHMAC_SHA256::OUTPUT_SIZE
];
18
unsigned
char
K
[
CHMAC_SHA256::OUTPUT_SIZE
];
19
bool
retry
;
20
21
public
:
26
RFC6979_HMAC_SHA256
(
const
unsigned
char
* key,
size_t
keylen,
const
unsigned
char
* msg,
size_t
msglen);
27
31
void
Generate
(
unsigned
char
* output,
size_t
outputlen);
32
33
~RFC6979_HMAC_SHA256
();
34
};
35
36
#endif
// PIVX_CRYPTO_RFC6979_HMAC_SHA256_H
CHMAC_SHA256::OUTPUT_SIZE
static const size_t OUTPUT_SIZE
Definition:
hmac_sha256.h:21
RFC6979_HMAC_SHA256
The RFC 6979 PRNG using HMAC-SHA256.
Definition:
rfc6979_hmac_sha256.h:15
RFC6979_HMAC_SHA256::retry
bool retry
Definition:
rfc6979_hmac_sha256.h:19
RFC6979_HMAC_SHA256::Generate
void Generate(unsigned char *output, size_t outputlen)
Generate a byte array.
Definition:
rfc6979_hmac_sha256.cpp:31
RFC6979_HMAC_SHA256::V
unsigned char V[CHMAC_SHA256::OUTPUT_SIZE]
Definition:
rfc6979_hmac_sha256.h:17
RFC6979_HMAC_SHA256::~RFC6979_HMAC_SHA256
~RFC6979_HMAC_SHA256()
Definition:
rfc6979_hmac_sha256.cpp:25
RFC6979_HMAC_SHA256::K
unsigned char K[CHMAC_SHA256::OUTPUT_SIZE]
Definition:
rfc6979_hmac_sha256.h:18
RFC6979_HMAC_SHA256::RFC6979_HMAC_SHA256
RFC6979_HMAC_SHA256(const unsigned char *key, size_t keylen, const unsigned char *msg, size_t msglen)
Construct a new RFC6979 PRNG, using the given key and message.
Definition:
rfc6979_hmac_sha256.cpp:14
hmac_sha256.h
Generated on Wed Apr 2 2025 00:40:27 for PIVX Core by
1.9.1