You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
457 B
10 lines
457 B
import registerPromiseWorker from 'promise-worker/register';
|
|
import * as sjcl from 'sjcl'
|
|
import { MessageCipherDTO } from '../../chat/dto/MessageCipherDTO';
|
|
|
|
|
|
registerPromiseWorker((payload: { passphrase: string, cipher: MessageCipherDTO }) => {
|
|
// console.log(payload)
|
|
// console.log('decrypted = ' + sjcl.decrypt(payload.passphrase, JSON.stringify(payload.cipher)));
|
|
return sjcl.decrypt(payload.passphrase, JSON.stringify(payload.cipher))
|
|
});
|