Protocol++® (Protocolpp®)  v5.6.2
ProtocolPP::jpoly1305 Class Reference

Public Member Functions

 jpoly1305 (const unsigned char *key, uint32_t length)
 
 jpoly1305 (unsigned char *ctx)
 
virtual ~jpoly1305 ()=default
 Standard Deconstructor for JPOLY1305 algorithm.
 
void ProcessData (const unsigned char *input, uint32_t length)
 
void context (unsigned char *ctx, uint32_t length=144)
 
void result (unsigned char *mac, uint32_t length=16)
 
 jpoly1305 (jpoly1305 &rhs)=delete
 
 jpoly1305 (const jpoly1305 &rhs)=delete
 

Constructor & Destructor Documentation

◆ jpoly1305() [1/2]

ProtocolPP::jpoly1305::jpoly1305 ( const unsigned char *  key,
uint32_t  length 
)

Constructor for JPOLY1305 algorithm

Parameters
key- initialization key
length- length of the key in bytes (32)

◆ jpoly1305() [2/2]

ProtocolPP::jpoly1305::jpoly1305 ( unsigned char *  ctx)
explicit

Constructor for JPOLY1305 algorithm with context

Parameters
ctx- context from previous session

Member Function Documentation

◆ context()

void ProtocolPP::jpoly1305::context ( unsigned char *  ctx,
uint32_t  length = 144 
)

Returns the context of JPOLY1305

Parameters
ctx- context of the engine
length- length of the context in bytes (144)

◆ ProcessData()

void ProtocolPP::jpoly1305::ProcessData ( const unsigned char *  input,
uint32_t  length 
)

Calculates the MAC using JPOLY1305

Parameters
input- data to hash
length- length of the input data

◆ result()

void ProtocolPP::jpoly1305::result ( unsigned char *  mac,
uint32_t  length = 16 
)

Returns the MAC using JPOLY1305

Parameters
mac- result of the hash calculation
length- length of the MAC data

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