1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 17:23:37 +00:00

added public key and share key to crypto service

This commit is contained in:
Kyle Spearrin
2018-07-02 17:09:45 -04:00
parent 0033b92a2d
commit e22915818c
2 changed files with 44 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ export abstract class CryptoService {
getKey: () => Promise<SymmetricCryptoKey>;
getKeyHash: () => Promise<string>;
getEncKey: () => Promise<SymmetricCryptoKey>;
getPublicKey: () => Promise<ArrayBuffer>;
getPrivateKey: () => Promise<ArrayBuffer>;
getOrgKeys: () => Promise<Map<string, SymmetricCryptoKey>>;
getOrgKey: (orgId: string) => Promise<SymmetricCryptoKey>;
@@ -24,6 +25,7 @@ export abstract class CryptoService {
clearKeys: () => Promise<any>;
toggleKey: () => Promise<any>;
makeKey: (password: string, salt: string) => Promise<SymmetricCryptoKey>;
makeShareKey: () => Promise<[CipherString, SymmetricCryptoKey]>;
hashPassword: (password: string, key: SymmetricCryptoKey) => Promise<string>;
makeEncKey: (key: SymmetricCryptoKey) => Promise<CipherString>;
encrypt: (plainValue: string | ArrayBuffer, key?: SymmetricCryptoKey) => Promise<CipherString>;