This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
BASE64.ENCODE
Kirill Chernyshov edited this page Mar 13, 2019
·
1 revision
BASE64.ENCODE
returns the base64 encoded version of a given string.
BASE64.ENCODE(arg1)
-
arg1
is a string
Let's say we receive some user information like that shown below:
{
"data":{
"user":{
"name": "secret_username",
"password": "secret_password"
}
}
}
If we want to transform that user information into an authentication token, we can use BASE64.ENCODE
:
CONCATENATE("Bearer ", BASE64.ENCODE(JOIN(":", data.user.name, data.user.password)))
This will return Bearer c2VjcmV0X3VzZXJuYW1lOnNlY3JldF9wYXNzd29yZA==
.
To perform the opposite operation, decoding a given base64 encoded string, use BASE64.DECODE