Base 64 is not for encryption purposes and is not secure. It is an encoding mechanism only.
Decodes a string so that it conforms to the Base64 Data Encodings specification (RFC 4648)
Base64 encoding schemes are commonly used when there is a need to encode binary data that needs to be stored and transferred over media that are designed to deal with textual data.
Base64-encoding is a way to encode 8 bit character data in a series of 6 bit characters. This was mostly used in transferring of data across 6 or 7 bit connections.
Since 8 bit characters consist of, well, 8 bits, Base64 encoding groups the characters into groups of three 8 bit characters, yielding 24 bits. Now, the resulting 24 bits are split into four sections of 6 bits instead. Each section of 6 bits is then translated into a new character in the range a-zA-Z0-9+/. 6 bits can contain 2^6 combinations, which is 64, thus the name Base64.
Base 64 decoding schemes are commonly used when there is a need to decode base64 encode textual data in the original form or binary data format. This ensures that the data remains intact without modification during transport without corrupting the source data.
The only downside is that base64 encoding will require around 33% more space than strings.
Base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. The term Base64 originates from a specific MIME content transfer encoding.
Base64 decoding schemes are commonly used when there is a need to decode binary data that was stored and needs to be transferred over media that are designed to deal with textual data. Base64 encoding and decoding function creates a base-64 encoded ASCII string from a "string" of binary data.