ObjFW
Public Member Functions | Static Public Member Functions
OFHash Class Reference

A base class for classes providing hash functions. More...

#import <OFHash.h>

Inheritance diagram for OFHash:
OFObject <OFObject> OFMD5Hash OFSHA1Hash

List of all members.

Public Member Functions

(void) - updateWithBuffer:length:
 Adds a buffer to the hash to be calculated.
(uint8_t *) - digest
 Returns a buffer containing the hash.
(BOOL) - isCalculated
 Returns a boolean whether the hash has already been calculated.

Static Public Member Functions

(size_t) + digestSize
 Returns the digest size of the hash, in bytes.
(size_t) + blockSize
 Returns the block size of the hash, in bytes.

Detailed Description

A base class for classes providing hash functions.


Member Function Documentation

+ (size_t) blockSize

Returns the block size of the hash, in bytes.

Returns:
The block size of the hash, in bytes
- (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.

Returns:
A buffer containing the hash
+ (size_t) digestSize

Returns the digest size of the hash, in bytes.

Returns:
The digest size of the hash, in bytes
- (BOOL) isCalculated

Returns a boolean whether the hash has already been calculated.

Returns:
A boolean whether the hash has already been calculated
- (void) updateWithBuffer: (const char*)  buf
length: (size_t)  length 

Adds a buffer to the hash to be calculated.

Parameters:
bufThe buffer which should be included into the calculation.
lengthThe length of the buffer

The documentation for this class was generated from the following files:
 All Classes Functions Variables Properties