-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
var key = "test";
var message = "admin";
var ciphertext = des (key, message, true, 0,'', 1);
btoa(ciphertext) // mDSUHsRcgOY=
des(key, ciphertext, false) // admin��� // CryptoJS
const keyHex = CryptoJS.enc.Utf8.parse('test')
const decrypted = CryptoJS.DES.decrypt(
{
iv: '',
salt: '',
ciphertext: CryptoJS.enc.Base64.parse(btoa(ciphertext))
},
keyHex,
{
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7
}
)
decrypted.toString(CryptoJS.enc.Utf8) // adminReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels