class SHA256

# class SHA256 | A standard SHA256 digest calculator. More...
Full name | `TelEngine::SHA256`
Definition | `#include <yateclass.h>`
Inherits | TelEngine::Hasher [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- SHA256 ()
- SHA256 (const SHA256& original)
- SHA256 (const void* buf, unsigned int len)
- SHA256 (const DataBlock& data)
- SHA256 (const String& str)
- SHA256& operator= (const SHA256& original)
- virtual ~SHA256 ()
- virtual void clear ()
- virtual void finalize ()
- virtual const unsigned char* rawDigest ()
- virtual unsigned int hashLength () const

#### Public Static Methods

- static inline unsigned int rawLength ()

#### Protected Methods

- bool updateInternal (const void* buf, unsigned int len)

## Detailed Description

A class to compute and check SHA256 digests

SHA256 () | ### SHA256

Construct a fresh initialized instance

SHA256 (const SHA256& original) | ### SHA256

Copy constructor

Parameters:

original | SHA256 instance to copy

SHA256 (const void* buf, unsigned int len) | ### SHA256

Construct a digest from a buffer of data

Parameters:

buf | Pointer to the data to be included in digest
len | Length of data in the buffer

SHA256 (const DataBlock& data) | ### SHA256

Construct a digest from a binary DataBlock

Parameters:

data | Binary data to be included in digest

SHA256 (const String& str) | ### SHA256

Construct a digest from a String

Parameters:

str | String to be included in digest

SHA256& operator= (const SHA256& original) | ### operator=

Assignment operator.

~SHA256 () | ### ~SHA256

[virtual]

Destroy the instance, free allocated memory

void clear () | ### clear

[virtual]

Clear the digest and prepare for reuse

Reimplemented from Hasher.

void finalize () | ### finalize

[virtual]

Finalize the digest computation, make result ready. Subsequent calls to update() will fail

Reimplemented from Hasher.

const unsigned char* rawDigest () | ### rawDigest

[virtual]

Returns a pointer to the raw 32-byte binary value of the message digest. The digest is finalized if if wasn't already

Returns: Pointer to the raw digest data or NULL if some error occured

Reimplemented from Hasher.

inline unsigned int rawLength () | ### rawLength

[static]

Return the length of the raw binary digest

Returns: Constant value of 32

unsigned int hashLength () | ### hashLength

[const virtual]

Return the length of the raw binary digest

Returns: Length of the digest in octets

Reimplemented from Hasher.

bool updateInternal (const void* buf, unsigned int len) | ### updateInternal

[protected]

Reimplemented from Hasher.

Generated by: paulc on bussard on Fri May 8 12:37:22 2015, using kdoc 2.0a54.