- Inherits from:
- Object
- Declared in:
- DSHA256.h
Object
|
+---DSHA256
Class Description
The DSHA256 class implements a number of methods for using the NIST's SHA256
algorithm.
- Last modified:
- 31-Oct-2007 (DSHA256.h)
Instance Variables
- private uint32_t _h[8]
- private uint32_t _count[2]
- private unsigned char _input[64]
- Constructors
- - (DSHA256 *) init
- Initialise the sha256 object
- Returns:
- the object
- - (DSHA256 *) init :(const char *) cstring
- Initialise the sha256 object with a string
- Parameters:
- cstring - the c-string
- Returns:
- the object
- - (DSHA256 *) init :(const unsigned char *) data :(unsigned long) length
- Initialise the sha256 object with data
- Parameters:
- data - the data ('\0' allowed)
length - the length of the data
- Returns:
- the object
- Reset method
- - (DSHA256 *) reset
- Reset the sha256 object
- Returns:
- the object
- Update methods
- - (DSHA256 *) 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 concatenated
- Parameters:
- cstring - the c-string to be feeded to sha256
- Returns:
- the object
- - (DSHA256 *) update :(const unsigned char *) data :(unsigned long) length
- Update the sha256 object with data. Repeated calls can be compared
to a single call in which the strings are concatenated
- Parameters:
- data - the data to be feeded to sha256
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