-
Notifications
You must be signed in to change notification settings - Fork 36
Padding #1
Copy link
Copy link
Open
Description
A weird issue has come up recently where the padding seems to be messed up.
To replicate:
var me = new Blowfish("me");
var Data = me.encrypt("stuff");
alert(me.decrypt(Data));
It should alert "stuff" but instead its "stuff000"
I wrote this simple addon for the decrypt function to fix it:
//Patch by me to remove trailing zeros
returndata = this.unescape(dec);
revertext = returndata.split("").reverse();
for(i=0;i<8;i++){
if(revertext[i] == "0"){
delete revertext[i];
}
}
returndata = revertext.reverse().join("");*
return returndata;but it is obviously not ideal.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels