Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
matrix-org
Olm
Commits
238c512d
Unverified
Commit
238c512d
authored
Oct 23, 2018
by
Hubert Chathi
Committed by
GitHub
Oct 23, 2018
Browse files
Merge pull request #75 from matrix-org/manuroe/objc_pk_private_key_length
OLMKit: Expose PK private key length
parents
1aafac28
c0d118f4
Changes
5
Hide whitespace changes
Inline
Side-by-side
xcode/OLMKit/OLMPkDecryption.h
View file @
238c512d
...
...
@@ -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
xcode/OLMKit/OLMPkDecryption.m
View file @
238c512d
...
...
@@ -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. */
...
...
xcode/OLMKit/OLMP
K
Encryption.h
→
xcode/OLMKit/OLMP
k
Encryption.h
View file @
238c512d
...
...
@@ -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.0
OLMPKEncryption
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.
...
...
xcode/OLMKit/OLMP
K
Encryption.m
→
xcode/OLMKit/OLMP
k
Encryption.m
View file @
238c512d
File moved
xcode/Podfile.lock
View file @
238c512d
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:
12a35a69f92c7facdd50b559128d1b4a17857
ba7
OLMKit:
6af55a19917c35f86df5198c213979ecdf8
ba7
6e
PODFILE CHECKSUM: 4e261dae61d833ec5585ced2473023b98909fd35
COCOAPODS: 1.
1.1
COCOAPODS: 1.
6.0.beta.2
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment