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

Extendable-output function (XOF). More...

Public Types

enum class  XofAlg
 Extendable-output function (XOF) algorithm. More...
 

Static Public Member Functions

static bvec_t Bytes (int numBytes, const bvec_t &message, XofAlg xofalg)
 Generate bytes using an extendable-output function (XOF). More...
 

Detailed Description

Extendable-output function (XOF).

Member Enumeration Documentation

◆ XofAlg

enum dipki::Xof::XofAlg
strong

Extendable-output function (XOF) algorithm.

Enumerator
Shake128 

SHAKE128 as per FIPS PUB 202.

Shake256 

SHAKE256 as per FIPS PUB 202.

Mgf1_Sha1 

MGF1-SHA-1 as per PKCS#1/RFC2437.

Mgf1_Sha256 

MGF1-SHA-256 as per PKCS#1/RFC2437.

Mgf1_Sha512 

MGF1-SHA-512 as per PKCS#1/RFC2437.

Member Function Documentation

◆ Bytes()

static bvec_t dipki::Xof::Bytes ( int  numBytes,
const bvec_t message,
XofAlg  xofalg 
)
static

Generate bytes using an extendable-output function (XOF).

Parameters
numBytesRequired number of output bytes.
messageInput message data.
xofalgXOF algorithm.
Returns
Output data in byte array.
dipki::Cnv::FromHex("3b5c056af3ebba70d4c805380420585562b32410a778f558ff951252407647e3"),
// 5B7EB772AECF04C74AF07D9D9C1C1F8D3A90DCDA00D5BAB1DC28DAECDC86EB87611E
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.
static bvec_t Bytes(int numBytes, const bvec_t &message, XofAlg xofalg)
Generate bytes using an extendable-output function (XOF).
@ Mgf1_Sha256
MGF1-SHA-256 as per PKCS#1/RFC2437.
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.