SuperpoweredSDK  v2.0.2
Superpowered Audio SDK
Superpowered::hasher Struct Reference

A structure for high-performance hashing. More...

#include "SuperpoweredHash.h"

Public Member Functions

void hashFinish (unsigned char *output)
 Finish hashing and return with the hash. More...
 
void hashProcess (const unsigned char *input)
 Perform hashing on the input data with the exact same input length of the hasher algorithm. More...
 
void hashStart (hashType type)
 Initialize the structure for hashing. More...
 
void hashUpdate (const unsigned char *input, int inputLengthBytes)
 Perform hashing on the input data with any kind of input length. More...
 
void hmacFinish (unsigned char *output)
 Finish hmac and return with the hash. More...
 
void hmacReset ()
 Re-initialize the structure for hmac. More...
 
void hmacStart (hashType type, const unsigned char *key, int keyLengthBytes)
 Initialize the structure for hash-based message authentication code hashing. More...
 
void hmacUpdate (const unsigned char *input, int inputLengthBytes)
 Perform hmac on the input data with any kind of input length. More...
 

Public Attributes

union {
   unsigned int   processed32 [2]
 
   unsigned long long   processed64 [2]
 
}; 
 Internal variable. More...
 
union {
   unsigned int   state32 [8]
 
   unsigned long long   state64 [8]
 
}; 
 Internal variable. More...
 
unsigned char buffer [128]
 Internal variable. More...
 
unsigned char innerPadding [128]
 Internal variable. More...
 
unsigned char outerPadding [128]
 Internal variable. More...
 
hashType type
 Internal variable. More...
 

Detailed Description

A structure for high-performance hashing.

Member Function Documentation

◆ hashFinish()

void Superpowered::hasher::hashFinish ( unsigned char *  output)

Finish hashing and return with the hash.

Parameters
outputThe output. Must be big enough to store the result (SHA512 has the maximum with 64 bytes).

◆ hashProcess()

void Superpowered::hasher::hashProcess ( const unsigned char *  input)

Perform hashing on the input data with the exact same input length of the hasher algorithm.

Can be called multiple times.

Parameters
inputPointer to the input data.

◆ hashStart()

void Superpowered::hasher::hashStart ( hashType  type)

Initialize the structure for hashing.

The structure will be as good as new after this.

Parameters
typeThe hash type.

◆ hashUpdate()

void Superpowered::hasher::hashUpdate ( const unsigned char *  input,
int  inputLengthBytes 
)

Perform hashing on the input data with any kind of input length.

Can be called multiple times.

Parameters
inputPointer to the input data.
inputLengthBytesSize of the input data in bytes.

◆ hmacFinish()

void Superpowered::hasher::hmacFinish ( unsigned char *  output)

Finish hmac and return with the hash.

Parameters
outputThe output. Must be big enough to store the result (SHA512 has the maximum with 64 bytes).

◆ hmacReset()

void Superpowered::hasher::hmacReset ( )

Re-initialize the structure for hmac.

◆ hmacStart()

void Superpowered::hasher::hmacStart ( hashType  type,
const unsigned char *  key,
int  keyLengthBytes 
)

Initialize the structure for hash-based message authentication code hashing.

The structure will be as good as new after this.

Parameters
typeThe hash type.
keyThe key.
keyLengthBytesThe size of the key in bytes.

◆ hmacUpdate()

void Superpowered::hasher::hmacUpdate ( const unsigned char *  input,
int  inputLengthBytes 
)

Perform hmac on the input data with any kind of input length.

Can be called multiple times.

Parameters
inputPointer to the input data.
inputLengthBytesSize of the input data in bytes.

Member Data Documentation

◆ @1

union { ... }

Internal variable.

◆ @3

union { ... }

Internal variable.

◆ buffer

unsigned char Superpowered::hasher::buffer[128]

Internal variable.

◆ innerPadding

unsigned char Superpowered::hasher::innerPadding[128]

Internal variable.

◆ outerPadding

unsigned char Superpowered::hasher::outerPadding[128]

Internal variable.

◆ processed32

unsigned int Superpowered::hasher::processed32[2]

◆ processed64

unsigned long long Superpowered::hasher::processed64[2]

◆ state32

unsigned int Superpowered::hasher::state32[8]

◆ state64

unsigned long long Superpowered::hasher::state64[8]

◆ type

hashType Superpowered::hasher::type

Internal variable.


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