ROSE  0.9.10.135
Public Member Functions | List of all members
Rose::Combinatorics::HasherSha256Builtin Class Reference

Description

Built-in SHA-256 hasher.

This algorithm is built into ROSE and doesn't depend on any external libraries.

Definition at line 323 of file Combinatorics.h.

#include <Combinatorics.h>

Inheritance diagram for Rose::Combinatorics::HasherSha256Builtin:
Inheritance graph
[legend]
Collaboration diagram for Rose::Combinatorics::HasherSha256Builtin:
Collaboration graph
[legend]

Public Member Functions

void clear ()
 Reset the hasher to its initial state. More...
 
const Digestdigest ()
 Return the digest. More...
 
void append (const uint8_t *message, size_t messageSize)
 Insert data into the digest. More...
 
- Public Member Functions inherited from Rose::Combinatorics::Hasher
std::string toString ()
 String representation of the digest. More...
 
void print (std::ostream &)
 Print a hash to a stream. More...
 
void insert (const std::string &x)
 Insert data into the digest. More...
 
void insert (uint64_t x)
 Insert data into the digest. More...
 
void insert (const uint8_t *x, size_t size)
 Insert data into the digest. More...
 
void insert (std::istream &stream)
 Insert data into the digest. More...
 

Additional Inherited Members

- Public Types inherited from Rose::Combinatorics::Hasher
typedef std::vector< uint8_t > Digest
 The digest of the input message. More...
 
- Static Public Member Functions inherited from Rose::Combinatorics::Hasher
static std::string toString (const Digest &)
 Convert a digest to a hexadecimal string. More...
 
- Protected Attributes inherited from Rose::Combinatorics::Hasher
Digest digest_
 

Member Function Documentation

void Rose::Combinatorics::HasherSha256Builtin::clear ( )
virtual

Reset the hasher to its initial state.

Reimplemented from Rose::Combinatorics::Hasher.

const Digest& Rose::Combinatorics::HasherSha256Builtin::digest ( )
virtual

Return the digest.

Finalizes the hash function and returns the digest for all the input. Additional input should not be inserted after this function is called since some hash functions don't support this.

Reimplemented from Rose::Combinatorics::Hasher.

void Rose::Combinatorics::HasherSha256Builtin::append ( const uint8_t *  message,
size_t  messageSize 
)
virtual

Insert data into the digest.

This is the lowest level method of inserting new message content into the digest. This can be called as often as desired, building a digest incrementally.

Implements Rose::Combinatorics::Hasher.


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