Moved encryption service to common
This commit is contained in:
parent
944377f111
commit
e06d98752a
@ -1,5 +1,5 @@
|
||||
import { EncryptionService } from "./EncryptionService";
|
||||
import { SJCLEncryptionService } from "./SJCLEncryptionService";
|
||||
import { EncryptionService } from "../../common/service/EncryptionService";
|
||||
import { SJCLEncryptionService } from "../../common/service/SJCLEncryptionService";
|
||||
// import PromiseWorker = require('promise-worker');
|
||||
import PromiseWorker from "promise-worker";
|
||||
|
||||
|
@ -4,7 +4,7 @@ import { ChatMessageDTO } from "../dto/ChatMessageDTO";
|
||||
import { MessageCipherDTO } from "../dto/MessageCipherDTO";
|
||||
import { ChatModel } from "../../common/model/ChatModel";
|
||||
import { Observer } from "../observe/Observer";
|
||||
import { EncryptionService } from "../service/EncryptionService";
|
||||
import { EncryptionService } from "../../common/service/EncryptionService";
|
||||
import { MarkDownService } from "../service/MarkDownService";
|
||||
import { JsonAPI } from "../singleton/JsonAPI";
|
||||
import { ChatMessageViewModel } from "../viewmodel/ChatMessageViewModel";
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { ChatMessageViewModel } from "../viewmodel/ChatMessageViewModel";
|
||||
import { ChatModel } from "../../common/model/ChatModel";
|
||||
import { MarkDownService } from "../service/MarkDownService";
|
||||
import { EncryptionService } from "../service/EncryptionService";
|
||||
import { EncryptionService } from "../../common/service/EncryptionService";
|
||||
import { NotificationService } from "../service/NotificationService";
|
||||
import { UserModel } from "../../common/model/UserModel";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import * as log from "loglevel";
|
||||
import { ChatMessageDTO } from "../../chat/dto/ChatMessageDTO";
|
||||
import { EncryptionService } from "../../chat/service/EncryptionService";
|
||||
import { EncryptionService } from "../service/EncryptionService";
|
||||
import { NotificationService } from "../../chat/service/NotificationService";
|
||||
import { JsonAPI } from "../../chat/singleton/JsonAPI";
|
||||
import { Sprintf } from "../../chat/singleton/Sprintf";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { MessageCipherDTO } from "../dto/MessageCipherDTO";
|
||||
import { MessageCipherDTO } from "../../chat/dto/MessageCipherDTO";
|
||||
|
||||
export interface EncryptionService {
|
||||
encrypt(passphrase: string, plainText: string): any;
|
@ -1,6 +1,6 @@
|
||||
import { EncryptionService } from "./EncryptionService";
|
||||
import * as sjcl from "sjcl";
|
||||
import { MessageCipherDTO } from "../dto/MessageCipherDTO";
|
||||
import { MessageCipherDTO } from "../../chat/dto/MessageCipherDTO";
|
||||
import PromiseWorker from "promise-worker";
|
||||
export class SJCLEncryptionService implements EncryptionService {
|
||||
private _params: sjcl.SjclCipherParams = { mode: "gcm", ts: 128, adata: "", iter: 10000 };
|
Loading…
Reference in New Issue
Block a user