public class CryptUtil extends Object
| Constructor and Description |
|---|
CryptUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
decrypt(String cipher)
decrypt the parameter string with the shared key read during
initialization
|
static String |
decrypt(String cipher,
SecretKey skey)
decrypt the first parameter string with the shared key received as the
second parameter
|
static String |
encrypt(String clear)
encrypt the parameter string with the shared key read during
initialization
|
static String |
encrypt(String clear,
SecretKey skey)
encrypt the first parameter string with the shared key received as the
second parameter
|
static String |
generateClientKey(String id) |
static SecretKey |
genKey(byte[] rawkey) |
static String |
init(String key)
Initialization method - reads the shared key from the file system
|
public static String init(String key) throws Exception
String - key - full path to encryption key including file nameExceptionpublic static String decrypt(String cipher) throws Exception
String - chiper - the string to decryptExceptionpublic static String decrypt(String cipher, SecretKey skey) throws Exception
String - chiper - the string to decryptSecretKey - skey - the shared keyExceptionpublic static String encrypt(String clear) throws Exception
String - clear - the string to encryptExceptionpublic static String encrypt(String clear, SecretKey skey) throws Exception
String - clear - the string to encryptSecretKey - skey - the shared keyExceptionCopyright © 2018 universAAL Consortium. All rights reserved.