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.
session-desktop/ts/test/test-utils/stubs/ciphers/FallBackSessionCipherStub.ts

12 lines
387 B
TypeScript

import { CipherTextObject } from '../../../../../libtextsecure/libsignal-protocol';
5 years ago
import { SignalService } from '../../../../protobuf';
export class FallBackSessionCipherStub {
public async encrypt(buffer: ArrayBuffer): Promise<CipherTextObject> {
return {
type: SignalService.Envelope.Type.FRIEND_REQUEST,
body: Buffer.from(buffer).toString('binary'),
};
}
}