mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
# 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
21 lines
661 B
Swift
21 lines
661 B
Swift
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
|
|
|
import Foundation
|
|
import Sodium
|
|
|
|
@testable import SessionMessagingKit
|
|
|
|
class MockGenericHash: Mock<GenericHashType>, GenericHashType {
|
|
func hash(message: Bytes, key: Bytes?) -> Bytes? {
|
|
return accept(args: [message, key]) as? Bytes
|
|
}
|
|
|
|
func hash(message: Bytes, outputLength: Int) -> Bytes? {
|
|
return accept(args: [message, outputLength]) as? Bytes
|
|
}
|
|
|
|
func hashSaltPersonal(message: Bytes, outputLength: Int, key: Bytes?, salt: Bytes, personal: Bytes) -> Bytes? {
|
|
return accept(args: [message, outputLength, key, salt, personal]) as? Bytes
|
|
}
|
|
}
|