Answer the question
In order to leave comments, you need to log in
Why is my async function returning a Promise {} instead of a value?
I have a function call console.log(WebCrypto())
AND a WebCrypto function itself
export async function WebCrypto(encrypted, saveName, saveData){
var mode = 'AES-GCM',
length = 256,
ivLength = 12;
if (encrypted) {
var result = await encrypt(saveData, saveName, mode, length, ivLength)
return result;
} else {
var result = await decrypt(saveData, saveName, mode, length)
return result;
}
};
{ cipherText: ArrayBuffer, iv: Uint8Array }
Promise {<pending>}
__proto__: Promise
: "resolved"
: Object
cipherText: ArrayBuffer(30) {}
iv: Uint8Array(12) [117, 8, 180, 132, 15, 200, 70, 62, 254, 82, 38, 192]
__proto__: Object
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question