From 59076a6bda54c90a257eaf3dae32aad7ad178d31 Mon Sep 17 00:00:00 2001 From: manuroe Date: Tue, 23 Oct 2018 15:47:46 +0200 Subject: OLMKit: Expose PK private key length --- xcode/OLMKit/OLMPkDecryption.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'xcode/OLMKit/OLMPkDecryption.m') diff --git a/xcode/OLMKit/OLMPkDecryption.m b/xcode/OLMKit/OLMPkDecryption.m index 75fe5f2..4af2c71 100644 --- a/xcode/OLMKit/OLMPkDecryption.m +++ b/xcode/OLMKit/OLMPkDecryption.m @@ -130,7 +130,7 @@ return privateKey; } --(NSString *)decryptMessage:(OLMPkMessage *)message error:(NSError *__autoreleasing _Nullable *)error { +- (NSString *)decryptMessage:(OLMPkMessage *)message error:(NSError *__autoreleasing _Nullable *)error { NSData *messageData = [message.ciphertext dataUsingEncoding:NSUTF8StringEncoding]; NSData *macData = [message.mac dataUsingEncoding:NSUTF8StringEncoding]; NSData *ephemeralKeyData = [message.ephemeralKey dataUsingEncoding:NSUTF8StringEncoding]; @@ -189,6 +189,10 @@ return plaintext; } ++ (NSUInteger)privateKeyLength { + return olm_pk_private_key_length(); +} + #pragma mark OLMSerializable /** Initializes from encrypted serialized data. Will throw error if invalid key or invalid base64. */ -- cgit v1.2.3