PRCYCoin
2.0.0.7rc1
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 BITCOIN_RFC6979_HMAC_SHA256_H
6
#define BITCOIN_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 // BITCOIN_RFC6979_HMAC_SHA256_H
hmac_sha256.h
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
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::K
unsigned char K[CHMAC_SHA256::OUTPUT_SIZE]
Definition:
rfc6979_hmac_sha256.h:18
RFC6979_HMAC_SHA256::~RFC6979_HMAC_SHA256
~RFC6979_HMAC_SHA256()
Definition:
rfc6979_hmac_sha256.cpp:25
CHMAC_SHA256::OUTPUT_SIZE
static const size_t OUTPUT_SIZE
Definition:
hmac_sha256.h:21
key
CKey key
Definition:
bip38tooldialog.cpp:173
RFC6979_HMAC_SHA256
The RFC 6979 PRNG using HMAC-SHA256.
Definition:
rfc6979_hmac_sha256.h:14
Generated on Tue Apr 28 2026 00:02:50 for PRCYCoin by
1.8.17