how to decrypt in SJCL using 256 bit key

476 views Asked by At

i am new in SJCL crypto library, i am doing the following for encrypting the plain text using 256 bit key in

var h = sjcl.codec.hex ;
salt = h.fromBits(sjcl.random.randomWords('10','0'));

var encryptedMessage = sjcl.encrypt(password,message,{count:2048,salt:salt,ks:256});

but i am unable to decrypt the same cipher , i want to know how to decrypt this cipher .

1

There are 1 answers

0
Novice On

well after so many hit and try i found this line working for me.

sjcl.decrypt(password,encMessage,{count:2048,ks:256});