mirror of https://github.com/oxen-io/session-ios
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			25 lines
		
	
	
		
			673 B
		
	
	
	
		
			Swift
		
	
			
		
		
	
	
			25 lines
		
	
	
		
			673 B
		
	
	
	
		
			Swift
		
	
| // Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
 | |
| 
 | |
| import Foundation
 | |
| import PromiseKit
 | |
| import Sodium
 | |
| 
 | |
| @testable import SessionMessagingKit
 | |
| 
 | |
| class MockSign: Mock<SignType>, SignType {
 | |
|     var Bytes: Int = 64
 | |
|     var PublicKeyBytes: Int = 32
 | |
|     
 | |
|     func signature(message: Bytes, secretKey: Bytes) -> Bytes? {
 | |
|         return accept(args: [message, secretKey]) as? Bytes
 | |
|     }
 | |
|     
 | |
|     func verify(message: Bytes, publicKey: Bytes, signature: Bytes) -> Bool {
 | |
|         return accept(args: [message, publicKey, signature]) as! Bool
 | |
|     }
 | |
|     
 | |
|     func toX25519(ed25519PublicKey: Bytes) -> Bytes? {
 | |
|         return accept(args: [ed25519PublicKey]) as? Bytes
 | |
|     }
 | |
| }
 |