Skip to content
New issue

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

crypt base64 url safe #1353

Closed
xAockd opened this issue Oct 9, 2013 · 2 comments
Closed

crypt base64 url safe #1353

xAockd opened this issue Oct 9, 2013 · 2 comments

Comments

@xAockd
Copy link

xAockd commented Oct 9, 2013

When I make hash($crypt->encryptBase64), for send url, hash look like

QGTBGorKoHBAGx/0qbtFjI6+iM3Eyggahl0KXER+iJUHUlrdcHb3zQF/VqGQeTJpfUYIi4kITryS0oQJLfVg==

Hash has special chars like '/' and '+'

It would be nice if we had something like $crypt->encryptbase64safeUrL() and $crypt->decryptbase64safeUrL().

Where base64 with + and / replaced with - and _

This conforms to rfc 4648.

@dreamsxin
Copy link
Contributor

I try complete it.

$crypt->encryptBase64($text, $key, $safe);
$crypt->decryptbase64($text, $key, $safe);

phalcon pushed a commit that referenced this issue Oct 10, 2013
 Implement #1353 add `safe` param for \Phalcon\Crypt::*Base64
@xAockd
Copy link
Author

xAockd commented Oct 10, 2013

Thx dreamsxin and phalcon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants