diff options
Diffstat (limited to 'xcode')
-rw-r--r-- | xcode/OLMKit/OLMPkDecryption.h | 7 | ||||
-rw-r--r-- | xcode/OLMKit/OLMPkDecryption.m | 6 | ||||
-rw-r--r-- | xcode/OLMKit/OLMPkEncryption.h (renamed from xcode/OLMKit/OLMPKEncryption.h) | 2 | ||||
-rw-r--r-- | xcode/OLMKit/OLMPkEncryption.m (renamed from xcode/OLMKit/OLMPKEncryption.m) | 0 | ||||
-rw-r--r-- | xcode/Podfile.lock | 16 |
5 files changed, 21 insertions, 10 deletions
diff --git a/xcode/OLMKit/OLMPkDecryption.h b/xcode/OLMKit/OLMPkDecryption.h index 8715a99..823dc78 100644 --- a/xcode/OLMKit/OLMPkDecryption.h +++ b/xcode/OLMKit/OLMPkDecryption.h @@ -59,6 +59,13 @@ NS_ASSUME_NONNULL_BEGIN */ - (NSString *)decryptMessage:(OLMPkMessage*)message error:(NSError* _Nullable *)error; +/** + Private key length. + + @return the length in bytes. + */ ++ (NSUInteger)privateKeyLength; + @end NS_ASSUME_NONNULL_END 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. */ diff --git a/xcode/OLMKit/OLMPKEncryption.h b/xcode/OLMKit/OLMPkEncryption.h index a55d5bc..6ae767c 100644 --- a/xcode/OLMKit/OLMPKEncryption.h +++ b/xcode/OLMKit/OLMPkEncryption.h @@ -5,7 +5,7 @@ you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0OLMPKEncryption + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/xcode/OLMKit/OLMPKEncryption.m b/xcode/OLMKit/OLMPkEncryption.m index c2e3d04..c2e3d04 100644 --- a/xcode/OLMKit/OLMPKEncryption.m +++ b/xcode/OLMKit/OLMPkEncryption.m diff --git a/xcode/Podfile.lock b/xcode/Podfile.lock index ecafd79..e9099c4 100644 --- a/xcode/Podfile.lock +++ b/xcode/Podfile.lock @@ -1,20 +1,20 @@ PODS: - - OLMKit (2.0.1): - - OLMKit/olmc (= 2.0.1) - - OLMKit/olmcpp (= 2.0.1) - - OLMKit/olmc (2.0.1) - - OLMKit/olmcpp (2.0.1) + - OLMKit (2.3.0): + - OLMKit/olmc (= 2.3.0) + - OLMKit/olmcpp (= 2.3.0) + - OLMKit/olmc (2.3.0) + - OLMKit/olmcpp (2.3.0) DEPENDENCIES: - OLMKit (from `../OLMKit.podspec`) EXTERNAL SOURCES: OLMKit: - :path: ../OLMKit.podspec + :path: "../OLMKit.podspec" SPEC CHECKSUMS: - OLMKit: 12a35a69f92c7facdd50b559128d1b4a17857ba7 + OLMKit: 6af55a19917c35f86df5198c213979ecdf8ba76e PODFILE CHECKSUM: 4e261dae61d833ec5585ced2473023b98909fd35 -COCOAPODS: 1.1.1 +COCOAPODS: 1.6.0.beta.2 |