mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
23 lines
494 B
Objective-C
23 lines
494 B
Objective-C
#import "ECKeyPair+Utilities.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@implementation ECKeyPair (Utilities)
|
|
|
|
- (ECKeyPair *)initWithPublicKey:(NSData *)snPublicKey privateKey:(NSData *)snPrivateKey
|
|
{
|
|
ECKeyPair *keyPair = [[ECKeyPair alloc] init];
|
|
[keyPair setValue:snPublicKey forKey:@"publicKey"];
|
|
[keyPair setValue:snPrivateKey forKey:@"privateKey"];
|
|
return keyPair;
|
|
}
|
|
|
|
- (NSData *)privateKey
|
|
{
|
|
return [NSData dataWithBytes:self->privateKey length:32];
|
|
}
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|