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
		
	
| 
											4 years ago
										 | // Copyright © 2022 Rangeproof Pty Ltd. All rights reserved. | ||
|  | 
 | ||
|  | import Foundation | ||
|  | import PromiseKit | ||
|  | import Sodium | ||
|  | 
 | ||
|  | @testable import SessionMessagingKit | ||
|  | 
 | ||
| 
											4 years ago
										 | class MockAeadXChaCha20Poly1305Ietf: Mock<AeadXChaCha20Poly1305IetfType>, AeadXChaCha20Poly1305IetfType { | ||
| 
											4 years ago
										 |     var KeyBytes: Int = 32 | ||
|  |     var ABytes: Int = 16 | ||
|  |      | ||
|  |     func encrypt(message: Bytes, secretKey: Bytes, nonce: Bytes, additionalData: Bytes?) -> Bytes? { | ||
| 
											4 years ago
										 |         return accept(args: [message, secretKey, nonce, additionalData]) as? Bytes | ||
| 
											4 years ago
										 |     } | ||
|  |      | ||
|  |     func decrypt(authenticatedCipherText: Bytes, secretKey: Bytes, nonce: Bytes, additionalData: Bytes?) -> Bytes? { | ||
| 
											4 years ago
										 |         return accept(args: [authenticatedCipherText, secretKey, nonce, additionalData]) as? Bytes | ||
| 
											4 years ago
										 |     } | ||
|  | } |