18 OF_ASSUME_NONNULL_BEGIN
31 #ifdef OF_HAVE_CLASS_PROPERTIES
32 @property (
class, readonly, nonatomic)
size_t digestSize;
33 @property (
class, readonly, nonatomic)
size_t blockSize;
54 @property (readonly, nonatomic, getter=isCalculated)
bool calculated;
64 @property (readonly, nonatomic)
const unsigned char *
digest
65 OF_RETURNS_INNER_POINTER;
72 + (instancetype)hashWithAllowsSwappableMemory: (
bool)allowsSwappableMemory;
93 - (instancetype)initWithAllowsSwappableMemory: (
bool)allowsSwappableMemory;
95 - (instancetype)init OF_UNAVAILABLE;
104 - (void)updateWithBuffer: (const
void *)buffer length: (
size_t)length;
123 OF_ASSUME_NONNULL_END
The root class for all other classes inside ObjFW.
Definition: OFObject.h:688
A protocol for the creation of copies.
Definition: OFObject.h:1346
A protocol for classes providing cryptographic hash functions.
Definition: OFCryptographicHash.h:30
void calculate()
Performs the final calculation of the cryptographic hash.
bool allowsSwappableMemory
Whether data may be stored in swappable memory.
Definition: OFCryptographicHash.h:49
bool calculated
A boolean whether the hash has already been calculated.
Definition: OFCryptographicHash.h:54
void reset()
Resets all state so that a new hash can be calculated.
size_t blockSize
The block size of the cryptographic hash, in bytes.
Definition: OFCryptographicHash.h:44
size_t digestSize
The digest size of the cryptographic hash, in bytes.
Definition: OFCryptographicHash.h:39
const unsigned char * digest
A buffer containing the cryptographic hash.
Definition: OFCryptographicHash.h:65