iota.lib.cpp
IOTA C++ Library
Public Member Functions | List of all members
IOTA::Crypto::Curl Class Reference

#include <curl.hpp>

Public Member Functions

 Curl ()
 
 ~Curl ()=default
 
void reset ()
 
void absorb (const Types::Trits &trits, std::size_t offset=0, std::size_t length=0)
 
void squeeze (Types::Trits &trits, std::size_t offset=0, std::size_t length=0)
 

Detailed Description

Hashing algorithm. Trits are absorbed by the sponge function and later squeezed to provide message digest, derive keys etc.

Constructor & Destructor Documentation

◆ Curl()

IOTA::Crypto::Curl::Curl ( )

Default ctor.

◆ ~Curl()

IOTA::Crypto::Curl::~Curl ( )
default

Default dtor.

Member Function Documentation

◆ absorb()

void IOTA::Crypto::Curl::absorb ( const Types::Trits &  trits,
std::size_t  offset = 0,
std::size_t  length = 0 
)

Absorb the input into the current state.

Parameters
tritsinput trits to be applied (absorbed) on current state.
offsetoffset at which the current state should be modified.
lengthlength of the given input that should be used for absorption.

◆ reset()

void IOTA::Crypto::Curl::reset ( )

Reset current state of the crypto algorithm.

◆ squeeze()

void IOTA::Crypto::Curl::squeeze ( Types::Trits &  trits,
std::size_t  offset = 0,
std::size_t  length = 0 
)

Squeeze the current state to the given input/output.

Parameters
tritsinput trits to be updated (squeezed) based on current state.
offsetoffset at which the input trists should be modified.
lengthlength of the current state that should be used for squeezing.

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