Package fr.gouv.vitam.common
Class BaseXx
- java.lang.Object
-
- fr.gouv.vitam.common.BaseXx
-
public final class BaseXx extends java.lang.Object
Base16, Base32 and Base64 codecs
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getBase16(byte[] bytes)
static java.lang.String
getBase32(byte[] bytes)
static java.lang.String
getBase64(byte[] bytes)
static java.lang.String
getBase64UrlWithoutPadding(byte[] bytes)
static java.lang.String
getBase64UrlWithPadding(byte[] bytes)
static byte[]
getFromBase16(java.lang.String base16)
static byte[]
getFromBase32(java.lang.String base32)
static byte[]
getFromBase64(java.lang.String base64Padding)
static byte[]
getFromBase64UrlPadding(java.lang.String base64Padding)
static byte[]
getFromBase64UrlWithoutPadding(java.lang.String base64)
-
-
-
Method Detail
-
getBase16
public static final java.lang.String getBase16(byte[] bytes)
- Parameters:
bytes
- to transform- Returns:
- the Base 16 representation
- Throws:
java.lang.IllegalArgumentException
- if argument is not compatible
-
getBase32
public static final java.lang.String getBase32(byte[] bytes)
- Parameters:
bytes
- to transform- Returns:
- the Base 32 representation
- Throws:
java.lang.IllegalArgumentException
- if argument is not compatible
-
getBase64UrlWithoutPadding
public static final java.lang.String getBase64UrlWithoutPadding(byte[] bytes)
- Parameters:
bytes
- to transform- Returns:
- the Base 64 Without Padding representation (used only for url)
- Throws:
java.lang.IllegalArgumentException
- if argument is not compatible
-
getBase64UrlWithPadding
public static final java.lang.String getBase64UrlWithPadding(byte[] bytes)
- Parameters:
bytes
- to transform- Returns:
- the Base 64 With Padding representation (used only for url)
- Throws:
java.lang.IllegalArgumentException
- if argument is not compatible
-
getBase64
public static final java.lang.String getBase64(byte[] bytes)
- Parameters:
bytes
- to transform- Returns:
- the Base 64 With Padding representation
- Throws:
java.lang.IllegalArgumentException
- if argument is not compatible
-
getFromBase16
public static final byte[] getFromBase16(java.lang.String base16)
- Parameters:
base16
- to transform- Returns:
- the byte from Base 16
- Throws:
java.lang.IllegalArgumentException
- if argument is not compatible
-
getFromBase32
public static final byte[] getFromBase32(java.lang.String base32)
- Parameters:
base32
- to transform- Returns:
- the byte from Base 32
- Throws:
java.lang.IllegalArgumentException
- if argument is not compatible
-
getFromBase64UrlWithoutPadding
public static final byte[] getFromBase64UrlWithoutPadding(java.lang.String base64)
- Parameters:
base64
- to transform- Returns:
- the byte from Base 64 Without Padding (used only for url)
- Throws:
java.lang.IllegalArgumentException
- if argument is not compatible
-
getFromBase64UrlPadding
public static final byte[] getFromBase64UrlPadding(java.lang.String base64Padding)
- Parameters:
base64Padding
- to transform- Returns:
- the byte from Base 64 With Padding (used only for url)
- Throws:
java.lang.IllegalArgumentException
- if argument is not compatible
-
getFromBase64
public static final byte[] getFromBase64(java.lang.String base64Padding)
- Parameters:
base64Padding
- to transform- Returns:
- the byte from Base 64 With Padding
- Throws:
java.lang.IllegalArgumentException
- if argument is not compatible
-
-