Swift Exception wrap NSData+keyVersionByte
This commit is contained in:
parent
84cdb1798d
commit
2761f4879e
@ -5,11 +5,11 @@
|
||||
import Foundation
|
||||
|
||||
extension Data {
|
||||
public var prependKeyType: Data {
|
||||
public func prependKeyType() -> Data {
|
||||
return (self as NSData).prependKeyType() as Data
|
||||
}
|
||||
|
||||
public var removeKeyType: Data {
|
||||
return (self as NSData).removeKeyType() as Data
|
||||
public func removeKeyType() throws -> Data {
|
||||
return try (self as NSData).removeKeyType() as Data
|
||||
}
|
||||
}
|
||||
|
||||
@ -340,10 +340,10 @@ class SMKSecretSessionCipherTest: XCTestCase {
|
||||
deviceId: bobMockClient.deviceId,
|
||||
preKeyId: bobPreKey.id,
|
||||
preKeyPublic: try! bobPreKey.keyPair.ecPublicKey().serialized,
|
||||
signedPreKeyPublic: try! bobSignedPreKey.keyPair.ecPublicKey().keyData.prependKeyType,
|
||||
signedPreKeyPublic: try! bobSignedPreKey.keyPair.ecPublicKey().keyData.prependKeyType(),
|
||||
signedPreKeyId: bobSignedPreKey.id,
|
||||
signedPreKeySignature: bobSignedPreKey.signature,
|
||||
identityKey: try! bobIdentityKey.ecPublicKey().keyData.prependKeyType)!
|
||||
identityKey: try! bobIdentityKey.ecPublicKey().keyData.prependKeyType())!
|
||||
|
||||
// SessionBuilder aliceSessionBuilder = new SessionBuilder(aliceStore, new SignalProtocolAddress("+14152222222", 1));
|
||||
let aliceSessionBuilder = aliceMockClient.createSessionBuilder(forRecipient: bobMockClient)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user