ObjFW
|
A protocol for classes providing hash functions. More...
#import <ObjFW/OFHash.h>
Instance Methods | |
(void) | - updateWithBuffer:length: |
Adds a buffer to the hash to be calculated. More... | |
(const uint8_t *) | - digest |
Returns a buffer containing the hash. More... | |
(bool) | - isCalculated |
Returns a boolean whether the hash has already been calculated. More... | |
(void) | - reset |
Resets all state so that a new hash can be calculated. More... | |
Instance Methods inherited from <OFObject> | |
(Class) | - class |
Returns the class of the object. More... | |
(Class) | - superclass |
Returns the superclass of the object. More... | |
(bool) | - isKindOfClass: |
Returns a boolean whether the object of the specified kind. More... | |
(bool) | - isMemberOfClass: |
Returns a boolean whether the object is a member of the specified class. More... | |
(bool) | - respondsToSelector: |
Returns a boolean whether the object responds to the specified selector. More... | |
(bool) | - conformsToProtocol: |
Checks whether the object conforms to the specified protocol. More... | |
(nullable IMP) | - methodForSelector: |
Returns the implementation for the specified selector. More... | |
(nullable const char *) | - typeEncodingForSelector: |
Returns the type encoding for the specified selector. More... | |
(nullable id) | - performSelector: |
Performs the specified selector. More... | |
(nullable id) | - performSelector:withObject: |
Performs the specified selector with the specified object. More... | |
(nullable id) | - performSelector:withObject:withObject: |
Performs the specified selector with the specified objects. More... | |
(bool) | - isEqual: |
Checks two objects for equality. More... | |
(id) | - retain |
Increases the retain count. More... | |
(unsigned int) | - retainCount |
Returns the retain count. More... | |
(void) | - release |
Decreases the retain count. More... | |
(id) | - autorelease |
Adds the object to the topmost OFAutoreleasePool of the thread's autorelease pool stack. More... | |
(id) | - self |
Returns the receiver. More... | |
(bool) | - isProxy |
Returns whether the object is a proxy object. More... | |
Class Methods | |
(instancetype) | + hash |
Creates a new hash. More... | |
(size_t) | + digestSize |
Returns the digest size of the hash, in bytes. More... | |
(size_t) | + blockSize |
Returns the block size of the hash, in bytes. More... | |
A protocol for classes providing hash functions.
+ (size_t) blockSize |
Returns the block size of the hash, in bytes.
- (const uint8_t*) digest |
Returns a buffer containing the hash.
The size of the buffer depends on the hash used. The buffer is part of the receiver's memory pool.
+ (size_t) digestSize |
Returns the digest size of the hash, in bytes.
+ (instancetype) hash |
- (bool) isCalculated |
Returns a boolean whether the hash has already been calculated.
- (void) reset |
- (void) updateWithBuffer: | (const void *) | buffer | |
length: | (size_t) | length | |
Adds a buffer to the hash to be calculated.
buffer | The buffer which should be included into the calculation |
length | The length of the buffer |