Encode Decode / Encrypt Decrypt
FreeThis plugin is a robust base64 encoder/decoder that is written in JavaScript. The base64-encoding and -decoding algorithms it uses are fully RFC 4648 compliant.
Setup Instructions
This are step-by-step instructions on how to get the plugin working on any Bubble App.
[ml][ol][li indent=0 align=left]Add this plugin to your application.[/li][li indent=0 align=left]Add a Workflow action, for example 'When an element is clicked'.[/li][li indent=0 align=left]Search in the actions for 'Encode'.[/li][li indent=0 align=left]Put in the input property any dynamic data (for example the value of an input element)[/li][li indent=0 align=left]Add another action to store the encoded data in the database (you will need to select 'Result of step 1 encoded data').[/li][li indent=0 align=left]Search for another action, this time 'Decode'.[/li][li indent=0 align=left]In the input property of the action, search for the encoded data you just stored in database.[/li][li indent=0 align=left]Add another action to once-again store the decoded (original) data in the database (you will need to select 'Result of step 1 decoded data').[/li][/ol][/ml] [b]Encode[/b] This function takes a byte string (the input parameter) and encodes it according to base64. The base64.encode() function is designed to be fully compatible with btoa() as described in the HTML Standard.
[b]Decode[/b] This function takes a base64-encoded string (the input parameter) and decodes it. The return value is in the form of a string containing only characters in the range from U+0000 to U+00FF, each representing a binary byte with values 0x00 to 0xFF. The base64.decode() function is designed to be fully compatible with atob() as described in the HTML Standard.
To base64-decode UTF-8-encoded data back into a Unicode string, UTF-8-decode is used for decoding it.
Documentation
This plugin adds two actions for you [b]Encode[/b] & [b]Decode[/b]. You need to call any of these actions in the Workflow to encode or decode.
The [b]Encode[/b] action contains the following properties to be used: [ml][ul][li indent=0 align=left][b]Input:[/b] A string-converted element to be encoded. Accepts all values from strings, numbers, and files.[/li][/ul][/ml] The action also returns the following: [ml][ul][li indent=0 align=left][b]Encoded Data:[/b] A string of the encoded element, previously defined in Input. Use this for a following decoding (e.g store encoded data in database for later decoding).[/li][/ul][/ml]
The [b]Decode[/b] action contains the following properties to be used: [ml][ul][li indent=0 align=left][b]Input:[/b] Place here an encoded string. Only accepts a base64-encoded string.[/li][/ul][/ml] The action also returns the following: [ml][ul][li indent=0 align=left][b]Decoded:[/b] A decoded element. It will return whatever was encoded (text, number, file) in it's original format.[/li][/ul][/ml]