class::crypto::Sha256

class crypto::Sha256
  : public api::CryptoWorkObject

This class provides access to system hardware or software routines that calculate SHA256 hash digest values.

The system must implmenent the CRYPT_SHA256_API_REQUEST in kernel_request_api().

#include <sys/crypt.hpp>
#include <sys/var.hpp>

Sha256 hash;
hash.initialize(); //call once per object
hash.start(); //start a new digest
Data some_data(128);
some_data.fill(0xaa);
hash << some_data; //update the digest with some data
hash.finalize();
printf("Hash is %s\n", hash.stringify());

Members

Sha256()
~Sha256()
int finalize()
int finish()
int initialize()
Sha256 & operator<<(

const var::Data & a
)

Sha256 & operator<<(

const var::ConstString & a
)

Sha256 & operator<<(

const var::String & a
)

const var::Array< u8, 32 > & output()
int start()
var::String to_string()
int update(

const arg::SourceBuffer input,
const arg::Size size
)

Details

Sha256()

~Sha256()

int finalize()

int finish()

int initialize()

Sha256 & operator<<(

const var::Data & a
)


Sha256 & operator<<(

const var::ConstString & a
)


Sha256 & operator<<(

const var::String & a
)


const var::Array< u8, 32 > & output()

int start()

var::String to_string()

int update(

const arg::SourceBuffer input,
const arg::Size size
)


X

Thanks for Coming!

Subscribe to news and updates