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
543 B
TypeScript
21 lines
543 B
TypeScript
5 years ago
|
import { CipherTextObject } from '../../../../window/types/libsignal-protocol';
|
||
|
import { SignalService } from '../../../../protobuf';
|
||
|
|
||
|
export class SessionCipherStub {
|
||
|
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: Buffer.from(buffer).toString('binary'),
|
||
|
};
|
||
|
}
|
||
|
}
|