18 OF_ASSUME_NONNULL_BEGIN
30 #ifdef OF_HAVE_CLASS_PROPERTIES
31 @property (
class, readonly, nonatomic)
size_t digestSize;
32 @property (
class, readonly, nonatomic)
size_t blockSize;
53 @property (readonly, nonatomic, getter=isCalculated)
bool calculated;
61 @property (readonly, nonatomic)
const unsigned char *
digest
62 OF_RETURNS_INNER_POINTER;
69 + (instancetype)cryptoHashWithAllowsSwappableMemory:
70 (
bool)allowsSwappableMemory;
91 - (instancetype)initWithAllowsSwappableMemory: (
bool)allowsSwappableMemory;
93 - (instancetype)init OF_UNAVAILABLE;
101 - (void)updateWithBuffer: (const
void *)buffer length: (
size_t)length;
113 OF_ASSUME_NONNULL_END
The root class for all other classes inside ObjFW.
Definition: OFObject.h:520
A protocol for the creation of copies.
Definition: OFObject.h:1187
A protocol for classes providing cryptographic hash functions.
Definition: OFCryptoHash.h:29
bool allowsSwappableMemory
Whether data may be stored in swappable memory.
Definition: OFCryptoHash.h:48
void reset()
Resets all state so that a new hash can be calculated.
const unsigned char * digest
A buffer containing the cryptographic hash.
Definition: OFCryptoHash.h:62
bool calculated
A boolean whether the hash has already been calculated.
Definition: OFCryptoHash.h:53
size_t blockSize
The block size of the cryptographic hash, in bytes.
Definition: OFCryptoHash.h:43
size_t digestSize
The digest size of the cryptographic hash, in bytes.
Definition: OFCryptoHash.h:38