]> git.saurik.com Git - apple/security.git/blob - KeychainCircle/KCAESGCMDuplexSession.h
Security-58286.41.2.tar.gz
[apple/security.git] / KeychainCircle / KCAESGCMDuplexSession.h
1 //
2 // KCAESGCMDuplexSession.h
3 // Security
4 //
5 //
6
7 #import <Foundation/Foundation.h>
8
9 NS_ASSUME_NONNULL_BEGIN
10
11 @interface KCAESGCMDuplexSession : NSObject <NSSecureCoding>
12
13 - (nullable NSData*) encrypt: (NSData*) data error: (NSError**) error;
14 - (nullable NSData*) decryptAndVerify: (NSData*) data error: (NSError**) error;
15
16 + (nullable instancetype) sessionAsSender: (NSData*) sharedSecret
17 context: (uint64_t) context;
18 + (nullable instancetype) sessionAsReceiver: (NSData*) sharedSecret
19 context: (uint64_t) context;
20
21 - (nullable instancetype) initAsSender: (NSData*) sharedSecret
22 context: (uint64_t) context;
23 - (nullable instancetype) initAsReceiver: (NSData*) sharedSecret
24 context: (uint64_t) context;
25 - (nullable instancetype) initWithSecret: (NSData*) sharedSecret
26 context: (uint64_t) context
27 as: (bool) inverted NS_DESIGNATED_INITIALIZER;
28
29 - (instancetype) init NS_UNAVAILABLE;
30
31
32 - (void)encodeWithCoder:(NSCoder *)aCoder;
33 - (nullable instancetype)initWithCoder:(NSCoder *)aDecoder;
34 + (BOOL)supportsSecureCoding;
35
36 @end
37
38 NS_ASSUME_NONNULL_END