We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: