CryptoSys PKI  23.0.0
Public Types | Static Public Member Functions | List of all members
dipki::Prf Class Reference

Pseudorandom function (PRF). More...

Public Types

enum class  PrfAlg
 Pseudorandom function (PRF) algorithm. More...
 

Static Public Member Functions

static bvec_t Bytes (int numBytes, const bvec_t &message, const bvec_t &key, PrfAlg prfalg, const std::string &customStr="")
 Generate output bytes using a pseudorandom function (PRF). More...
 

Detailed Description

Pseudorandom function (PRF).

Member Enumeration Documentation

◆ PrfAlg

enum dipki::Prf::PrfAlg
strong

Pseudorandom function (PRF) algorithm.

Enumerator
Kmac128 

KMAC128 as per NIST SP 800-185.

Kmac256 

KMAC256 as per NIST SP 800-185.

Member Function Documentation

◆ Bytes()

static bvec_t dipki::Prf::Bytes ( int  numBytes,
const bvec_t message,
const bvec_t key,
PrfAlg  prfalg,
const std::string &  customStr = "" 
)
static

Generate output bytes using a pseudorandom function (PRF).

Parameters
numBytesRequired number of output bytes.
messageInput message data.
keyKey in byte array.
prfalgPRF algorithm.
customStrCustomization string (optional)
Returns
Output data in byte array.
dipki::Cnv::FromHex("404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F"),
// E5780B0D3EA6F7D3A429C5706AA43A00FADBD7D49628839E3187243F456EE14E
static std::string ToHex(const bvec_t &bv)
Encodes an array of bytes as a hexadecimal-encoded string.
static bvec_t FromHex(const std::string &s)
Decodes a hexadecimal-encoded string as an array of bytes.
@ Kmac128
KMAC128 as per NIST SP 800-185.
static bvec_t Bytes(int numBytes, const bvec_t &message, const bvec_t &key, PrfAlg prfalg, const std::string &customStr="")
Generate output bytes using a pseudorandom function (PRF).
Copyright © 2004-24 D.I. Management Services Pty Limited t/a CryptoSys ABN 78 083 210 584 Australia. All rights reserved. <www.di-mgt.com.au> <www.cryptosys.net>. Generated on Mon Sep 23 2024 15:37:33 by Doxygen 1.9.1.