luceos I need the raw password for it. I do some pretty crazy hashing on the password different from laravel's built in hashing:
export function getPassphraseKey(passphrase, salt) {
return new Promise((resolve, reject) => {
window.crypto.subtle
.importKey(
"raw",
new TextEncoder().encode(passphrase),
{name: "PBKDF2"},
false,
["deriveBits", "deriveKey"]
)
.then(key =>
window.crypto.subtle.deriveKey(
{
name: "PBKDF2",
salt,
iterations: 128000,
hash: "SHA-256"
},
key,
{name: "AES-GCM", length: 256},
true,
["encrypt", "decrypt"]
)
)
.then(resolve, reject);
});
}