I made the following code to test it out, it seems like the util library works just fine and i am able to parse the base64 inputs into binary array, however the decipher.start() method bugs out.
{
function test_it(ct, key, iv){
console.log("@@@@@ ---- Crypto segment ---- @@@@@@")
console.log("Cipher text", ct, "Key", key, "IV", iv)
var decipher = forge.cipher.createDecipher('3DES-CBC', forge.util.binary.base64.decode(key))
x = forge.util.binary.base64.decode(ct)
console.log("ct",x)
console.log("Loading iv into decipher ...")
y = forge.util.binary.base64.decode(iv)
console.log("iv",y)
decipher.start({iv: y})
console.log("Deciphering ....")
//decipher.update(x)
console.log(decipher.output.toHex())
console.log("@@@@@ ---- Crypto segment ---- @@@@@@")
}
This code gets called directly in the browser page and produces the following result :
The blocking line is decipher.start({iv: y}), could you provide me with some ideas on where this may come from / what i'm missing ?
Hi,
I am trying to leverage forge inside a chrome extension.
I was able to import forge.all.min.js through the content script section of the manifest, like so :
I made the following code to test it out, it seems like the util library works just fine and i am able to parse the base64 inputs into binary array, however the decipher.start() method bugs out.
This code gets called directly in the browser page and produces the following result :
The blocking line is decipher.start({iv: y}), could you provide me with some ideas on where this may come from / what i'm missing ?