ObjFW
Loading...
Searching...
No Matches
OFSHA384Or512Hash.h
1/*
2 * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im>
3 *
4 * All rights reserved.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License version 3.0 only,
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * version 3.0 for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * version 3.0 along with this program. If not, see
17 * <https://www.gnu.org/licenses/>.
18 */
19
20#import "OFCryptographicHash.h"
21
22OF_ASSUME_NONNULL_BEGIN
23
24@class OFSecureData;
25
32{
33@private
34 OFSecureData *_iVarsData;
35@protected
36 struct {
37 uint64_t state[8];
38 uint64_t bits[2];
39 union {
40 unsigned char bytes[128];
41 uint64_t words[80];
42 } buffer;
43 size_t bufferLength;
44 } *_iVars;
45@private
46 bool _allowsSwappableMemory;
47 bool _calculated;
48 OF_RESERVE_IVARS(OFSHA384Or512Hash, 4)
49}
50@end
51
52OF_ASSUME_NONNULL_END
The root class for all other classes inside ObjFW.
Definition OFObject.h:692
A base class for SHA-384 and SHA-512.
Definition OFSHA384Or512Hash.h:33
A class for storing arbitrary data in secure (non-swappable) memory, securely wiping it when it gets ...
Definition OFSecureData.h:38
A protocol for classes providing cryptographic hash functions.
Definition OFCryptographicHash.h:34