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 { return { type: SignalService.Envelope.Type.CIPHERTEXT, body: StringUtils.decode(buffer, 'binary'), }; } public async decryptPreKeyWhisperMessage( buffer: ArrayBuffer | Uint8Array ): Promise { throw new Error('Method not implemented.'); } public async decryptWhisperMessage( buffer: ArrayBuffer | Uint8Array ): Promise { throw new Error('Method not implemented.'); } public async getRecord(encodedNumber: string): Promise { throw new Error('Method not implemented.'); } public async getRemoteRegistrationId(): Promise { throw new Error('Method not implemented.'); } public async hasOpenSession(): Promise { return false; } public async closeOpenSessionForDevice(): Promise { throw new Error('Method not implemented.'); } public async deleteAllSessionsForDevice(): Promise { throw new Error('Method not implemented.'); } }