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.
		
		
		
		
		
			
		
			
				
	
	
		
			21 lines
		
	
	
		
			734 B
		
	
	
	
		
			Swift
		
	
			
		
		
	
	
			21 lines
		
	
	
		
			734 B
		
	
	
	
		
			Swift
		
	
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
 | 
						|
 | 
						|
import Foundation
 | 
						|
import PromiseKit
 | 
						|
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
 | 
						|
    }
 | 
						|
}
 |