rename deriveIntermediateKey -> deriveInteractiveKey

This commit is contained in:
Neeraj Gupta 2022-03-06 21:06:20 +05:30
parent 9a3b40e7e4
commit 8ccb53cf4b
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1
3 changed files with 4 additions and 4 deletions

View file

@ -74,7 +74,7 @@ export async function generateAndSaveIntermediateKeyAttributes(
const cryptoWorker = await new CryptoWorker();
const intermediateKekSalt: string =
await cryptoWorker.generateSaltToDeriveKey();
const intermediateKek: KEK = await cryptoWorker.deriveIntermediateKey(
const intermediateKek: KEK = await cryptoWorker.deriveInteractiveKey(
passphrase,
intermediateKekSalt
);

View file

@ -291,7 +291,7 @@ export async function deriveSensitiveKey(passphrase: string, salt: string) {
}
}
export async function deriveIntermediateKey(passphrase: string, salt: string) {
export async function deriveInteractiveKey(passphrase: string, salt: string) {
await sodium.ready;
// default algo can change in future when we upgrade library.
// this assert act as a safegaurd for us to identify any such issue.

View file

@ -84,8 +84,8 @@ export class Crypto {
return libsodium.deriveSensitiveKey(passphrase, salt);
}
async deriveIntermediateKey(passphrase, salt) {
return libsodium.deriveIntermediateKey(passphrase, salt);
async deriveInteractiveKey(passphrase, salt) {
return libsodium.deriveInteractiveKey(passphrase, salt);
}
async decryptB64(data, nonce, key) {