-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Works fine :)
Found a small issue for my case:
encryption in php -> decryption in javascript
Sometime I get an error: Not a base64-encoded string
Was a simple to fix:
Crypt.php changes Characters after base64_encode:
strtr($sBase64, '+/', '-_');
This has to be undone in crypt.js:
function decode64(text) {
text = text.replace(/\s/g, "");
text = text.replace(/-/g, '+');
text = text.replace(/_/g, '/');
if (!(/^[a-z0-9+/\s]+={0,2}$/i.test(text)) || text.length % 4 > 0) {
alert("Not a base64-encoded string.");
}
Most likely the same issue is in encode64
Metadata
Metadata
Assignees
Labels
No labels