System.NetEncoding.TBase64Encoding

From RAD Studio API Documentation
Jump to: navigation, search

System.NetEncoding.TNetEncodingSystem.TObjectTBase64Encoding

Delphi

TBase64Encoding = class(TNetEncoding)

C++

class PASCALIMPLEMENTATION TBase64Encoding : public TNetEncoding

Properties

Type Visibility Source Unit Parent
class public
System.NetEncoding.pas
System.NetEncoding.hpp
System.NetEncoding System.NetEncoding

Description

Provides methods to encode and decode data in base64 format.

To use TBase64Encoding you usually do not need to create your own instance. You can use TNetEncoding.Base64 instead.

TBase64Encoding provides the following methods:

Encoding Decoding
Input Method Output Input Method Output

TBytes

EncodeBytesToString

String

DecodeStringToBytes

TBytes

TBytes

Encode

TBytes

Decode

TBytes

TStream

TStream

TStream

String

String

String

For example:

  • Encode('Example') returns 'RXhhbXBsZQ=='.
  • Decode('RXhhbXBsZQ==') returns 'Example'.

Input Strings for Decode and DecodeStringToBytes should be UTF8 encoded.

See Also