DEV Community

Samandar Ravshanov
Samandar Ravshanov

Posted on

📦Base64-URL de-encode/code, escape and unescape.

from functorflow import ff

r = ff('base64-url').encode('FunctorFlow is cool')
print(r) # 'RnVuY3RvckZsb3cgaXMgY29vbA'

r = ff('base64-url').decode('RnVuY3RvckZsb3cgaXMgY29vbA')
print(r) # 'FunctorFlow is cool'

r = ff('base64-url').escape('This+is/goingto+escape==')
print(r) # 'This-is_goingto-escape'

r = ff('base64-url').unescape('This-is_goingto-escape')
print(r) #'This+is/goingto+escape=='
Enter fullscreen mode Exit fullscreen mode

Top comments (0)