|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.borg.common.EncryptionHelper
public class EncryptionHelper
class containing encryption and decryption methods for borg
| Constructor Summary | |
|---|---|
EncryptionHelper(String keyStoreLocation,
String keyStorePassword)
constructor - loads a KeyStore from a file |
|
| Method Summary | |
|---|---|
static void |
createStore(String location,
String password)
create a new JCEKS Key Store |
String |
decrypt(String cipherText,
String keyAlias)
decrypt a String using a key from the key store |
String |
encrypt(String clearText,
String keyAlias)
encrypt a String using a key from the key store |
String |
exportKey(String keyAlias,
String keyStorePassword)
Export the borg key in text form |
static void |
generateKey(String location,
String password,
String name)
generate a new encryption key in the key store. |
static void |
importKey(String location,
String encodedKey,
String keyAlias,
String password)
Import a provided key into a KeyStore |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EncryptionHelper(String keyStoreLocation,
String keyStorePassword)
throws Exception
keyStoreLocation - - key store locationkeyStorePassword - - key store password
Exception| Method Detail |
|---|
public static void createStore(String location,
String password)
throws Exception
location - - location (file) for the key storepassword - - key store password
Exception
public static void generateKey(String location,
String password,
String name)
throws Exception
location - - key store locationpassword - - key store passwordname - - key alias
Exception
public String encrypt(String clearText,
String keyAlias)
throws Exception
clearText - - the string to encryptkeyAlias - - the encryption key alias
Exception
public String decrypt(String cipherText,
String keyAlias)
throws Exception
cipherText - - the string to decryptkeyAlias - - the decryption key alias
Exception
public String exportKey(String keyAlias,
String keyStorePassword)
throws Exception
keyAlias - the key aliaskeyStorePassword - the keystore password
Exception
public static void importKey(String location,
String encodedKey,
String keyAlias,
String password)
throws Exception
location - - the keystore locationencodedKey - - the encoded key to importkeyAlias - - the key aliaspassword - - the key store password
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||