A self hosted chat application with end-to-end encrypted messaging.
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.
 
 
 
 
 
 

13 lines
574 B

import { EncryptionService } from "./EncryptionService";
import { SJCLEncryptionService } from "./SJCLEncryptionService";
import PromiseWorker = require('promise-worker');
// import PromiseWorker from "promise-worker";
export class EncryptionServiceFactory {
private static readonly _worker = new Worker('/js/worker.js');
// @ts-ignore
private static readonly _promiseWorker = new PromiseWorker(EncryptionServiceFactory._worker);
public static getEncryptionService(): EncryptionService {
return new SJCLEncryptionService(this._promiseWorker)
}
}