aboutsummaryrefslogtreecommitdiff
path: root/xcode/OLMKit/OLMSession.m
diff options
context:
space:
mode:
authormanuroe <manu@matrix.org>2016-11-18 11:39:39 +0100
committermanuroe <manu@matrix.org>2016-11-18 11:39:39 +0100
commit93926e90477355c671b50704711a58889832b077 (patch)
tree6d15abb79d902c7b9a87e40b05eb08ed7e59fa30 /xcode/OLMKit/OLMSession.m
parent29de7825c9607955d061c5fe75c7f29d78dfaec5 (diff)
OLMKit: Fixed warnings in objc wrapper
Diffstat (limited to 'xcode/OLMKit/OLMSession.m')
-rw-r--r--xcode/OLMKit/OLMSession.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/xcode/OLMKit/OLMSession.m b/xcode/OLMKit/OLMSession.m
index e50da75..3801e08 100644
--- a/xcode/OLMKit/OLMSession.m
+++ b/xcode/OLMKit/OLMSession.m
@@ -167,9 +167,9 @@
}
- (BOOL)matchesInboundSession:(NSString *)oneTimeKeyMessage {
- NSData *otk = [oneTimeKeyMessage dataUsingEncoding:NSUTF8StringEncoding];
+ NSMutableData *otk = [NSMutableData dataWithData:[oneTimeKeyMessage dataUsingEncoding:NSUTF8StringEncoding]];
- size_t result = olm_matches_inbound_session(_session, otk.bytes, otk.length);
+ size_t result = olm_matches_inbound_session(_session, otk.mutableBytes, otk.length);
if (result == 1) {
return YES;
}
@@ -184,11 +184,11 @@
- (BOOL)matchesInboundSessionFrom:(NSString *)theirIdentityKey oneTimeKeyMessage:(NSString *)oneTimeKeyMessage {
NSData *idKey = [theirIdentityKey dataUsingEncoding:NSUTF8StringEncoding];
- NSData *otk = [oneTimeKeyMessage dataUsingEncoding:NSUTF8StringEncoding];
+ NSMutableData *otk = [NSMutableData dataWithData:[oneTimeKeyMessage dataUsingEncoding:NSUTF8StringEncoding]];
size_t result = olm_matches_inbound_session_from(_session,
idKey.bytes, idKey.length,
- otk.bytes, otk.length);
+ otk.mutableBytes, otk.length);
if (result == 1) {
return YES;
}