diff options
author | manuroe <manu@matrix.org> | 2016-11-07 17:27:09 +0100 |
---|---|---|
committer | manuroe <manu@matrix.org> | 2016-11-07 17:27:09 +0100 |
commit | 27a8c28da4e5c62d8863ee3d30642109d713c4d6 (patch) | |
tree | 58e5afddfa83e50f02672e7d7bd573bcdd1df177 /xcode/OLMKit | |
parent | 5d1b66c350ac017613982f904b896750766654de (diff) |
OLMKit: Update obj-c wrapper to 2.0.0
Diffstat (limited to 'xcode/OLMKit')
-rw-r--r-- | xcode/OLMKit/OLMInboundGroupSession.h | 2 | ||||
-rw-r--r-- | xcode/OLMKit/OLMInboundGroupSession.m | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/xcode/OLMKit/OLMInboundGroupSession.h b/xcode/OLMKit/OLMInboundGroupSession.h index a507490..46de3a0 100644 --- a/xcode/OLMKit/OLMInboundGroupSession.h +++ b/xcode/OLMKit/OLMInboundGroupSession.h @@ -24,6 +24,6 @@ - (NSString*)sessionIdentifier; /** base64 ciphertext -> UTF-8 plaintext */ -- (NSString*)decryptMessage:(NSString*)message; +- (NSString*)decryptMessage:(NSString*)message messageIndex:(NSUInteger*)messageIndex; @end diff --git a/xcode/OLMKit/OLMInboundGroupSession.m b/xcode/OLMKit/OLMInboundGroupSession.m index d95d1ab..ea79e14 100644 --- a/xcode/OLMKit/OLMInboundGroupSession.m +++ b/xcode/OLMKit/OLMInboundGroupSession.m @@ -79,7 +79,7 @@ return idString; } -- (NSString *)decryptMessage:(NSString *)message +- (NSString *)decryptMessage:(NSString *)message messageIndex:(NSUInteger*)messageIndex { NSParameterAssert(message != nil); NSData *messageData = [message dataUsingEncoding:NSUTF8StringEncoding]; @@ -96,7 +96,7 @@ // message buffer is destroyed by olm_group_decrypt_max_plaintext_length mutMessage = messageData.mutableCopy; NSMutableData *plaintextData = [NSMutableData dataWithLength:maxPlaintextLength]; - size_t plaintextLength = olm_group_decrypt(session, mutMessage.mutableBytes, mutMessage.length, plaintextData.mutableBytes, plaintextData.length); + size_t plaintextLength = olm_group_decrypt(session, mutMessage.mutableBytes, mutMessage.length, plaintextData.mutableBytes, plaintextData.length, messageIndex); if (plaintextLength == olm_error()) { const char *error = olm_inbound_group_session_last_error(session); NSAssert(NO, @"olm_group_decrypt error: %s", error); |