public class EncryptionUtils extends Object
| Constructor and Description |
|---|
EncryptionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
decode(String secret,
String keyMaterial,
String algorithm)
Decodes a given secret by specified key material and algorithm.
If no key material and algorithm are supplied, using defaults: keyMaterial - "jaas is the way" algorithm - "Blowfish" |
static String |
Decrypt(String source,
String keyFile,
String passwd,
RefObject<String> error)
Decrypts the specified source using Store.
|
static String |
decrypt(String source,
String keyFile,
String passwd,
String alias)
Decrypts the specified source using certification file.
|
static String |
encode(String secret,
String keyMaterial,
String algorithm)
Encodes a given secret by specified key material and algorithm
If not supplying any key material and algorithm using defaults: keyMaterial - "jaas is the way" algorithm - "Blowfish" |
static String |
encrypt(String source,
String certificateFile,
String passwd,
String alias)
Encrypts the specified source using certification file.
|
static KeyStore |
getKeyStore(String path,
String passwd,
String storeType) |
static boolean |
IsPassword(String name)
Determines whether the specified name is a password holder.
|
public static final String encrypt(String source, String certificateFile, String passwd, String alias) throws Exception
source - The source.certificateFile - The certificate file.passwd - The passwd.alis - The certificate alias.Exceptionpublic static String decrypt(String source, String keyFile, String passwd, String alias) throws Exception
source - The source.keyFile - The key file.passwd - The passwd.alias - The certificate alias.Exceptionpublic static final String Decrypt(String source, String keyFile, String passwd, RefObject<String> error)
source - The source.certificateFingerPrint - The certification finger print.error - The error.public static boolean IsPassword(String name)
name - The name.public static String encode(String secret, String keyMaterial, String algorithm)
secret - the encrypted objectkeyMaterial - the material for the encryptionalgorithm - defines which algorithm to usepublic static String decode(String secret, String keyMaterial, String algorithm)
secret - the object to decodekeyMaterial - the material for the decoding actionalgorithm - defines which algorithm to useCopyright © 2012. All Rights Reserved.