Class Blake2Engine

Inheritance Relationships

Base Type

Class Documentation

class default_prng::Blake2Engine : public PRNG

Inheritence diagram for default_prng::Blake2Engine:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="default_prng::Blake2Engine" tooltip="default_prng::Blake2Engine" fillcolor="#BFBFBF"]
    "2" [label="PRNG" tooltip="PRNG"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for default_prng::Blake2Engine:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="default_prng::Blake2Engine" tooltip="default_prng::Blake2Engine" fillcolor="#BFBFBF"]
    "2" [label="PRNG" tooltip="PRNG"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Defines the PRNG engine (based on BLAKE2) used by OpenFHE. It can be used as an example for adding other PRNG engines to OpenFHE.

Public Types

enum [anonymous]

Values:

enumerator MAX_SEED_GENS
enumerator PRNG_BUFFER_SIZE
using blake2_seed_array_t = std::array<PRNG::result_type, MAX_SEED_GENS>

Public Functions

inline explicit Blake2Engine(const blake2_seed_array_t &seed, uint64_t counter)

Main constructor taking an array of integers as a seed and a counter. If there is no value for the counter, then pass zero as the counter value.

~Blake2Engine()
inline virtual PRNG::result_type operator()() override

main call to the PRNG