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.
		
		
		
		
		
			
		
			
				
	
	
		
			57 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			TypeScript
		
	
			
		
		
	
	
			57 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			TypeScript
		
	
| import {
 | |
|   CipherTextObject,
 | |
|   SessionCipher,
 | |
| } from '../../../../../libtextsecure/libsignal-protocol';
 | |
| import { SignalService } from '../../../../protobuf';
 | |
| import { StringUtils } from '../../../../session/utils';
 | |
| 
 | |
| export class SessionCipherStub implements SessionCipher {
 | |
|   public storage: any;
 | |
|   public address: any;
 | |
|   constructor(storage: any, address: any) {
 | |
|     this.storage = storage;
 | |
|     this.address = address;
 | |
|   }
 | |
| 
 | |
|   public async encrypt(
 | |
|     buffer: ArrayBuffer | Uint8Array
 | |
|   ): Promise<CipherTextObject> {
 | |
|     return {
 | |
|       type: SignalService.Envelope.Type.CIPHERTEXT,
 | |
|       body: StringUtils.decode(buffer, 'binary'),
 | |
|     };
 | |
|   }
 | |
| 
 | |
|   public async decryptPreKeyWhisperMessage(
 | |
|     buffer: ArrayBuffer | Uint8Array
 | |
|   ): Promise<ArrayBuffer> {
 | |
|     throw new Error('Method not implemented.');
 | |
|   }
 | |
| 
 | |
|   public async decryptWhisperMessage(
 | |
|     buffer: ArrayBuffer | Uint8Array
 | |
|   ): Promise<ArrayBuffer> {
 | |
|     throw new Error('Method not implemented.');
 | |
|   }
 | |
| 
 | |
|   public async getRecord(encodedNumber: string): Promise<any> {
 | |
|     throw new Error('Method not implemented.');
 | |
|   }
 | |
| 
 | |
|   public async getRemoteRegistrationId(): Promise<number> {
 | |
|     throw new Error('Method not implemented.');
 | |
|   }
 | |
| 
 | |
|   public async hasOpenSession(): Promise<boolean> {
 | |
|     return false;
 | |
|   }
 | |
| 
 | |
|   public async closeOpenSessionForDevice(): Promise<void> {
 | |
|     throw new Error('Method not implemented.');
 | |
|   }
 | |
| 
 | |
|   public async deleteAllSessionsForDevice(): Promise<void> {
 | |
|     throw new Error('Method not implemented.');
 | |
|   }
 | |
| }
 |