Base64

Summary

Provides base64 encoding and decoding functions.

Description

The System.Encoding.Base64 class provides base64 encoding and decoding.

The base64 encoding scheme used is specified in RFC 2045 - MIME (Multipurpose Internet Mail Extensions).

Examples

Basic Usage
1
2
3
4
5
6
7
8
9
10
import System;
import System.Encoding;
 
string sentence = "This is a test.";
 
string encoded = Base64.encode(sentence);
Console.log(encoded);
 
string decoded = Base64.decode(encoded);
Console.log(decoded);

Methods

  • decode

    Decodes the input string using base64.

  • encode

    Encodes the input string with base64 encoding.

Share

HTML | BBCode | Direct Link