public class Util extends Object
| Modifier and Type | Field and Description |
|---|---|
private static String |
ANDROID_ACTIVITY_CLASS |
private static boolean |
IS_ANDROID |
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
checkLength(byte[] data,
int size)
Validate the length of the data provided
|
static int |
checkSize(int size,
int minimumSize)
Validate the minimum size supported by the parameter
|
static String |
formatter(AeroGearCrypto.Algorithm algorithm,
AeroGearCrypto.Mode mode)
Utility method to format algorithms name in Java like way
|
static String |
formatter(AeroGearCrypto.Mode mode,
AeroGearCrypto.Padding padding)
Utility method to format algorithms name in Java like way
|
static boolean |
isAndroid()
Verify if the platform is running Android
|
static byte[] |
newBuffer(int length)
Create a new buffer with the specified size
|
static byte[] |
newByteArray(byte[] data)
Copy the provided data
|
private static final boolean IS_ANDROID
private static final String ANDROID_ACTIVITY_CLASS
public static byte[] checkLength(byte[] data,
int size)
data - size - public static int checkSize(int size,
int minimumSize)
size - minimumSize - public static String formatter(AeroGearCrypto.Algorithm algorithm, AeroGearCrypto.Mode mode)
algorithm - mode - public static String formatter(AeroGearCrypto.Mode mode, AeroGearCrypto.Padding padding)
mode - padding - public static byte[] newBuffer(int length)
length - public static byte[] newByteArray(byte[] data)
data - public static boolean isAndroid()
Copyright © 2014 JBoss by Red Hat. All Rights Reserved.