2 // KCAESGCMDuplexSession.h
7 #import <Foundation/Foundation.h>
9 NS_ASSUME_NONNULL_BEGIN
11 @interface KCAESGCMDuplexSession
: NSObject
<NSSecureCoding
>
13 - (nullable NSData
*) encrypt
: (NSData
*) data error
: (NSError
**) error
;
14 - (nullable NSData
*) decryptAndVerify
: (NSData
*) data error
: (NSError
**) error
;
16 + (nullable instancetype
) sessionAsSender
: (NSData
*) sharedSecret
17 context
: (uint64_t) context
;
18 + (nullable instancetype
) sessionAsReceiver
: (NSData
*) sharedSecret
19 context
: (uint64_t) context
;
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
;
29 - (instancetype
) init NS_UNAVAILABLE
;
32 - (void)encodeWithCoder
:(NSCoder
*)aCoder
;
33 - (nullable instancetype
)initWithCoder
:(NSCoder
*)aDecoder
;
34 + (BOOL
)supportsSecureCoding
;