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.
		
		
		
		
		
			
		
			
				
	
	
		
			27 lines
		
	
	
		
			729 B
		
	
	
	
		
			TypeScript
		
	
			
		
		
	
	
			27 lines
		
	
	
		
			729 B
		
	
	
	
		
			TypeScript
		
	
| import { SignalService } from '../../../../protobuf';
 | |
| import { CipherTextObject } from '../../../../window/types/libsignal-protocol';
 | |
| 
 | |
| export class SecretSessionCipherStub {
 | |
|   public async encrypt(
 | |
|     _destinationPubkey: string,
 | |
|     _senderCertificate: SignalService.SenderCertificate,
 | |
|     innerEncryptedMessage: CipherTextObject
 | |
|   ): Promise<ArrayBuffer> {
 | |
|     const { body } = innerEncryptedMessage;
 | |
| 
 | |
|     return Buffer.from(body, 'binary').buffer;
 | |
|   }
 | |
| 
 | |
|   public async decrypt(
 | |
|     _cipherText: ArrayBuffer,
 | |
|     _me: { number: string; deviceId: number }
 | |
|   ): Promise<{
 | |
|     isMe?: boolean;
 | |
|     sender: string;
 | |
|     content: ArrayBuffer;
 | |
|     type: SignalService.Envelope.Type;
 | |
|   }> {
 | |
|     throw new Error('Not implemented');
 | |
|   }
 | |
| }
 |