mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
ca4ce52402
# Conflicts: # Session.xcodeproj/project.pbxproj # SessionMessagingKitTests/Open Groups/Models/BatchRequestInfoSpec.swift # SessionMessagingKitTests/Open Groups/OpenGroupAPISpec.swift # SessionMessagingKitTests/Open Groups/OpenGroupManagerSpec.swift # SessionMessagingKitTests/_TestUtilities/TestOnionRequestAPI.swift # SessionTests/Conversations/Settings/ThreadSettingsViewModelSpec.swift # SessionUtilitiesKit/Networking/BatchResponse.swift # SessionUtilitiesKitTests/Networking/BatchResponseSpec.swift
19 lines
716 B
Swift
19 lines
716 B
Swift
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
|
|
|
import Foundation
|
|
import Sodium
|
|
|
|
@testable import SessionMessagingKit
|
|
|
|
class MockAeadXChaCha20Poly1305Ietf: Mock<AeadXChaCha20Poly1305IetfType>, AeadXChaCha20Poly1305IetfType {
|
|
var KeyBytes: Int = 32
|
|
var ABytes: Int = 16
|
|
|
|
func encrypt(message: Bytes, secretKey: Bytes, nonce: Bytes, additionalData: Bytes?) -> Bytes? {
|
|
return accept(args: [message, secretKey, nonce, additionalData]) as? Bytes
|
|
}
|
|
|
|
func decrypt(authenticatedCipherText: Bytes, secretKey: Bytes, nonce: Bytes, additionalData: Bytes?) -> Bytes? {
|
|
return accept(args: [authenticatedCipherText, secretKey, nonce, additionalData]) as? Bytes
|
|
}
|
|
}
|