mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Explicitly malloc'd buffer should either be explicitly free'd or ownership given to NSData via `freeWhenDone:YES` Instead I opted to avoid the explict malloc altogether, and avoided some unnecessary allocations. Also made sure encryption failures propogate to error handler // FREEBIE
17 lines
342 B
Objective-C
17 lines
342 B
Objective-C
//
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
|
//
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@interface OWSProvisioningCipher : NSObject
|
|
|
|
@property (nonatomic, readonly) NSData *ourPublicKey;
|
|
|
|
- (instancetype)initWithTheirPublicKey:(NSData *)theirPublicKey;
|
|
- (nullable NSData *)encrypt:(NSData *)plainText;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|