public final class

Base64

extends Object
java.lang.Object
   ↳ org.springframework.security.crypto.codec.Base64

Class Overview

Base64 encoder which is a reduced version of Robert Harder's public domain implementation (version 2.3.7). See http://iharder.net/base64 for more information.

For internal use only.

Summary

Constants
int DECODE Specify decoding in first bit.
int DO_BREAK_LINES Do break lines when encoding.
int ENCODE Specify encoding in first bit.
int NO_OPTIONS No options specified.
int ORDERED Encode using the special "ordered" dialect of Base64 described here: http://www.faqs.org/qa/rfcc-1940.html.
int URL_SAFE Encode using Base64-like encoding that is URL- and Filename-safe as described in Section 4 of RFC3548: http://www.faqs.org/rfcs/rfc3548.html.
Public Constructors
Base64()
Public Methods
static byte[] decode(byte[] bytes)
static byte[] encode(byte[] bytes)
static boolean isBase64(byte[] bytes)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int DECODE

Specify decoding in first bit. Value is zero.

Constant Value: 0 (0x00000000)

public static final int DO_BREAK_LINES

Do break lines when encoding. Value is 8.

Constant Value: 8 (0x00000008)

public static final int ENCODE

Specify encoding in first bit. Value is one.

Constant Value: 1 (0x00000001)

public static final int NO_OPTIONS

No options specified. Value is zero.

Constant Value: 0 (0x00000000)

public static final int ORDERED

Encode using the special "ordered" dialect of Base64 described here: http://www.faqs.org/qa/rfcc-1940.html.

Constant Value: 32 (0x00000020)

public static final int URL_SAFE

Encode using Base64-like encoding that is URL- and Filename-safe as described in Section 4 of RFC3548: http://www.faqs.org/rfcs/rfc3548.html. It is important to note that data encoded this way is not officially valid Base64, or at the very least should not be called Base64 without also specifying that is was encoded using the URL- and Filename-safe dialect.

Constant Value: 16 (0x00000010)

Public Constructors

public Base64 ()

Public Methods

public static byte[] decode (byte[] bytes)

public static byte[] encode (byte[] bytes)

public static boolean isBase64 (byte[] bytes)