Lines Matching refs:password
14 * @param {String} password Password to use to encrypt plaintext
17 async encrypt(plaintext, password) {
20 const {hash, iv} = await this.derivePkdf2(password, salt, 'SHA-256', this.iterations);
34 * @param {String} password Password to use to decrypt ciphertext
38 async decrypt(ciphertext, password, legacy = false) {
43 ({hash, iv} = this.deriveMd5(password, salt));
45 ({hash, iv} = await this.derivePkdf2(password, salt, 'SHA-256', this.iterations));
63 * @param {String} password Password to use to decrypt ciphertext
66 async autodecrypt(ciphertext, password) {
68 return await this.decrypt(ciphertext, password);
72 return await this.decrypt(ciphertext, password, true);
124 * @param {string} strPassword The clear text password
132 const password = new TextEncoder().encode(strPassword);
134 const ik = await window.crypto.subtle.importKey("raw", password, {name: "PBKDF2"}, false, ["deriveBits"]);
154 * The old, legacy method to derive key and IV from the password
156 * @param {string} strPassword The clear text password
162 const password = new TextEncoder().encode(strPassword);
164 const D1 = md5.array(new Uint8Array([...password, ...salt]));
165 const D2 = md5.array(new Uint8Array([...D1, ...password, ...salt]));
166 const D3 = md5.array(new Uint8Array([...D2, ...password, ...salt]));