- Inherits from:
- Object
- Declared in:
- DSHA1.h
Object
|
+---DSHA1
Class Description
The DSHA1 class implements a number of methods for using the NIST's SHA
algorithm. The code is based on 'SHA-1 in C' by Steve Reid (steve[at]edmweb.com)
which is in Public Domain.
- Last modified:
- 31-Oct-2007 (DSHA1.h)
Instance Variables
- private uint32_t _state[5]
- private uint32_t _count[2]
- private unsigned char _buffer[64]
- Constructors
- - (DSHA1 *) init
- Initialise the sha object
- Returns:
- the object
- - (DSHA1 *) init :(const char *) cstring
- Initialise the sha object with a string
- Parameters:
- cstring - the c-string
- Returns:
- the object
- - (DSHA1 *) init :(const unsigned char *) data :(unsigned long) length
- Initialise the sha object with data
- Parameters:
- data - the data ('\0' allowed)
length - the length of the data
- Returns:
- the object
- Update methods
- - (DSHA1 *) update :(const char *) cstring
- Update the object with a c-string. Repeated calls can be compared
to a single call in which the strings are concatted
- Parameters:
- cstring - the c-string to be feeded to sha1
- Returns:
- the object
- - (DSHA1 *) update :(const unsigned char *) data :(unsigned long) length
- Update the object with data. Repeated calls can be compared
to a single call in which the strings are concatted
- Parameters:
- data - the data to be feeded to sha
length - the length of the data
- Returns:
- the object
- Digest methods
- - (DData *) digest
- Return the (current) digest of all data passed to the object.
- Returns:
- the (new) data string object with the digest
- - (DText *) hexdigest
- Returns the (current) digest of all data passed to the object. The
returning string contains the digest in hexadecimal ascii characters.
- Returns:
- the (new) string object with the digest
generated 05-Nov-2007 by ObjcDoc 3.0.0