|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
org.identityconnectors.common.security.SecurityUtil
public final class SecurityUtil
Method Summary | |
---|---|
static char[] |
bytesToChars(byte[] bytes) Converts bytes to chars without using any external functions that might allocate additional buffers for the potentially sensitive data. |
static byte[] |
charsToBytes(char[] chars) Converts chars to bytes without using any external functions that might allocate additional buffers for the potentially sensitive data. |
static void |
clear(byte[] bytes) Clears an array of potentially sensitive bytes |
static void |
clear(char[] chars) Clears an array of potentially sensitive chars |
static java.lang.String |
computeBase64SHA1Hash(byte[] bytes) Computes the base 64 encoded SHA1 hash of the input |
static java.lang.String |
computeBase64SHA1Hash(char[] input) Computes the base 64 encoded SHA1 hash of the input |
static boolean |
verifyBase64SHA1Hash(char[] input, java.lang.String hash) Verifies the base 64-encoded SHA1 hash of the input. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static byte[] charsToBytes(char[] chars)
chars
- The charspublic static char[] bytesToChars(byte[] bytes)
bytes
- The bytes (to convert into characters).public static void clear(byte[] bytes)
bytes
- The bytes. May be null.public static void clear(char[] chars)
chars
- The characters. May be null.public static java.lang.String computeBase64SHA1Hash(char[] input)
input
- The input charspublic static java.lang.String computeBase64SHA1Hash(byte[] bytes)
bytes
- The input bytes.public static boolean verifyBase64SHA1Hash(char[] input, java.lang.String hash)
input
- The input charshash
- The expected hash
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |