PIVX Core  5.6.99
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
RFC6979_HMAC_SHA256 Class Reference

The RFC 6979 PRNG using HMAC-SHA256. More...

#include <rfc6979_hmac_sha256.h>

Public Member Functions

 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. More...
 
void Generate (unsigned char *output, size_t outputlen)
 Generate a byte array. More...
 
 ~RFC6979_HMAC_SHA256 ()
 

Private Attributes

unsigned char V [CHMAC_SHA256::OUTPUT_SIZE]
 
unsigned char K [CHMAC_SHA256::OUTPUT_SIZE]
 
bool retry
 

Detailed Description

The RFC 6979 PRNG using HMAC-SHA256.

Definition at line 14 of file rfc6979_hmac_sha256.h.

Constructor & Destructor Documentation

◆ 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.

The message is assumed to be already hashed.

Definition at line 14 of file rfc6979_hmac_sha256.cpp.

Here is the call graph for this function:

◆ ~RFC6979_HMAC_SHA256()

RFC6979_HMAC_SHA256::~RFC6979_HMAC_SHA256 ( )

Definition at line 25 of file rfc6979_hmac_sha256.cpp.

Member Function Documentation

◆ Generate()

void RFC6979_HMAC_SHA256::Generate ( unsigned char *  output,
size_t  outputlen 
)

Generate a byte array.

Definition at line 31 of file rfc6979_hmac_sha256.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ K

unsigned char RFC6979_HMAC_SHA256::K[CHMAC_SHA256::OUTPUT_SIZE]
private

Definition at line 18 of file rfc6979_hmac_sha256.h.

◆ retry

bool RFC6979_HMAC_SHA256::retry
private

Definition at line 19 of file rfc6979_hmac_sha256.h.

◆ V

unsigned char RFC6979_HMAC_SHA256::V[CHMAC_SHA256::OUTPUT_SIZE]
private

Definition at line 17 of file rfc6979_hmac_sha256.h.


The documentation for this class was generated from the following files: