iText 7 7.1.8 API
iText.Kernel.XMP.Impl.Base64 Class Reference

A utility class to perform base64 encoding and decoding as specified in RFC-1521. More...

Static Public Member Functions

static byte[]  Encode (byte[] src)
  Encode the given byte[]. More...
 
static byte[]  Encode (byte[] src, int lineFeed)
  Encode the given byte[]. More...
 
static String  Encode (String src)
  Encode the given string. More...
 
static byte[]  Decode (byte[] src)
  Decode the given byte[]. More...
 
static String  Decode (String src)
  Decode the given string. More...
 

Detailed Description

A utility class to perform base64 encoding and decoding as specified in RFC-1521.

A utility class to perform base64 encoding and decoding as specified in RFC-1521. See also RFC 1421.

Revision
1.4

Member Function Documentation

◆ Decode() [1/2]

static byte [] iText.Kernel.XMP.Impl.Base64.Decode ( byte[]  src )
inlinestatic

Decode the given byte[].

Parameters
src the base64-encoded data.
Returns
the decoded data.
Exceptions
System.ArgumentException Thrown if the base 64 strings contains non-valid characters, beside the bas64 chars, LF, CR, tab and space are accepted.

◆ Decode() [2/2]

static String iText.Kernel.XMP.Impl.Base64.Decode ( String  src )
inlinestatic

Decode the given string.

Parameters
src the base64-encoded string.
Returns
the decoded string.

◆ Encode() [1/3]

static byte [] iText.Kernel.XMP.Impl.Base64.Encode ( byte[]  src )
inlinestatic

Encode the given byte[].

Parameters
src the source string.
Returns
the base64-encoded data.

◆ Encode() [2/3]

static byte [] iText.Kernel.XMP.Impl.Base64.Encode ( byte[]  src,
int  lineFeed 
)
inlinestatic

Encode the given byte[].

Parameters
src the source string.
lineFeed a linefeed is added after
linefeed
characters; must be dividable by four; 0 means no linefeeds
Returns
the base64-encoded data.

◆ Encode() [3/3]

static String iText.Kernel.XMP.Impl.Base64.Encode ( String  src )
inlinestatic

Encode the given string.

Parameters
src the source string.
Returns
the base64-encoded string.