openMSX
Public Member Functions | Static Public Member Functions | List of all members
openmsx::SHA1 Class Reference

Helper class to perform a sha1 calculation. More...

#include <sha1.hh>

Public Member Functions

 SHA1 ()
 
void update (const uint8_t *data, size_t len)
 Incrementally calculate the hash value. More...
 
Sha1Sum digest ()
 Get the final hash. More...
 

Static Public Member Functions

static Sha1Sum calc (const uint8_t *data, size_t len)
 Easier to use interface, if you can pass all data in one go. More...
 

Detailed Description

Helper class to perform a sha1 calculation.

Basic usage:

Definition at line 60 of file sha1.hh.

Constructor & Destructor Documentation

openmsx::SHA1::SHA1 ( )

Definition at line 176 of file sha1.cc.

Member Function Documentation

Sha1Sum openmsx::SHA1::calc ( const uint8_t *  data,
size_t  len 
)
static

Easier to use interface, if you can pass all data in one go.

Definition at line 281 of file sha1.cc.

References digest(), and update().

Referenced by openmsx::Rom::getOriginalSHA1().

Sha1Sum openmsx::SHA1::digest ( )

Get the final hash.

After this method is called, calls to update() are invalid.

Definition at line 275 of file sha1.cc.

Referenced by calc(), and openmsx::SectorAccessibleDisk::getSha1Sum().

void openmsx::SHA1::update ( const uint8_t *  data,
size_t  len 
)

Incrementally calculate the hash value.

Definition at line 238 of file sha1.cc.

Referenced by calc(), and openmsx::SectorAccessibleDisk::getSha1Sum().


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