tango.util.digest.Sha01

License:

BSD style: see doc/license.txt for details

Version:

Initial release: Feb 2006

Author:

Regan Heath, Oskar Linde

This module implements common parts of the SHA-0 and SHA-1 algoritms

class Sha01 : MerkleDamgard [package, abstract] #
uint digestSize() [final] #
The digest size of Sha-0 and Sha-1 is 20 bytes
void reset() [protected, override] #
Initialize the cipher

Remarks:

Returns the cipher state to it's initial value
void createDigest(ubyte[] buf) [protected, override] #
Obtain the digest

Returns:

the digest

Remarks:

Returns a digest of the current cipher state, this may be the final digest, or a digest of the state between calls to update()
uint blockSize() [protected, override] #
block size

Returns:

the block size

Remarks:

Specifies the size (in bytes) of the block of data to pass to each call to transform(). For SHA0 the blockSize is 64.
uint addSize() [protected, override] #
Length padding size

Returns:

the length padding size

Remarks:

Specifies the size (in bytes) of the padding which uses the length of the data which has been ciphered, this padding is carried out by the padLength method. For SHA0 the addSize is 0.
void padMessage(ubyte[] data) [protected, override] #
Pads the cipher data

Params:

dataa slice of the cipher buffer to fill with padding

Remarks:

Fills the passed buffer slice with the appropriate padding for the final call to transform(). This padding will fill the cipher buffer up to blockSize()-addSize().
void padLength(ubyte[] data, ulong length) [protected, override] #
Performs the length padding

Params:

datathe slice of the cipher buffer to fill with padding
lengththe length of the data which has been ciphered

Remarks:

Fills the passed buffer slice with addSize() bytes of padding based on the length in bytes of the input data which has been ciphered.
uint f(uint t, uint B, uint C, uint D) [protected, static] #
uint[] K [protected, static, const] #
uint[5] initial [private, static, const] #