Class Base64Support

java.lang.Object
net.shibboleth.utilities.java.support.codec.Base64Support

@Deprecated(since="9.0.0", forRemoval=true) public final class Base64Support extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Deprecated stub.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    static byte[]
    decode(String data)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Decodes (un)chunked Base64 encoded data.
    static byte[]
    Deprecated, for removal: This API element is subject to removal in a future version.
    Decodes (un)chunked Base64URL encoded data.
    static String
    encode(byte[] data, boolean chunked)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Base64 encodes the given binary data.
    static String
    encodeURLSafe(byte[] data)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Base64URL encodes the given binary data.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Base64Support

      private Base64Support()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructor.
  • Method Details

    • encode

      @Nonnull public static String encode(@Nonnull byte[] data, boolean chunked) throws EncodingException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Base64 encodes the given binary data.
      Parameters:
      data - data to encode
      chunked - whether the encoded data should be chunked or not
      Returns:
      the base64 encoded data
      Throws:
      EncodingException - when any Exception is thrown from the underlying encoder, or the output is null.
    • decode

      @Nonnull public static byte[] decode(@Nonnull String data) throws DecodingException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Decodes (un)chunked Base64 encoded data.
      Parameters:
      data - Base64 encoded data
      Returns:
      the decoded data
      Throws:
      DecodingException - when any Exception is thrown from the underlying decoder, or the output is null.
    • encodeURLSafe

      @Nonnull public static String encodeURLSafe(@Nonnull byte[] data) throws EncodingException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Base64URL encodes the given binary data.

      This is compliant with RFC 4648, Section 5: "Base 64 Encoding with URL and Filename Safe Alphabet".

      Parameters:
      data - data to encode
      Returns:
      the base64url encoded data
      Throws:
      EncodingException - if the input data can not be encoded as a base64 string.
    • decodeURLSafe

      @Nonnull public static byte[] decodeURLSafe(@Nonnull String data) throws DecodingException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Decodes (un)chunked Base64URL encoded data.

      This is compliant with RFC 4648, Section 5: "Base 64 Encoding with URL and Filename Safe Alphabet".

      Parameters:
      data - Base64URL encoded data
      Returns:
      the decoded data
      Throws:
      DecodingException - if unable to decode the input data.