|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.util.KnimeEncryption
public final class KnimeEncryption
This class handles the encryption and decryption with the static stored key. To this class one static key supplier can be registered that is invoked if no key is available.
Method Summary | |
---|---|
static SecretKey |
createSecretKey(String phrase)
Generates a SecretKey based on the given key phrase. |
static String |
decrypt(SecretKey secretKey,
String password)
Decrypts password with the given SecrectKey . |
static String |
decrypt(String password)
Decrypts password. |
static String |
encrypt(char[] password)
Enrypts password. |
static String |
encrypt(SecretKey secretKey,
char[] password)
Enrypts password with the given SecrectKey . |
static void |
setEncryptionKeySupplier(EncryptionKeySupplier supplier)
Sets the static encryption key supplier for this global static knime encryptor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String encrypt(char[] password) throws BadPaddingException, IllegalBlockSizeException, InvalidKeyException, UnsupportedEncodingException
password
- as char array
IllegalBlockSizeException
- IllegalBlockSizeException
BadPaddingException
- BadPaddingException
InvalidKeyException
- InvalidKeyException
UnsupportedEncodingException
- UnsupportedEncodingException
public static String encrypt(SecretKey secretKey, char[] password) throws BadPaddingException, IllegalBlockSizeException, InvalidKeyException, UnsupportedEncodingException
SecrectKey
.
secretKey
- SecretKey
used to encrypt the passwordpassword
- as char array
IllegalBlockSizeException
- IllegalBlockSizeException
BadPaddingException
- BadPaddingException
InvalidKeyException
- InvalidKeyException
UnsupportedEncodingException
- UnsupportedEncodingException
public static String decrypt(String password) throws BadPaddingException, IllegalBlockSizeException, InvalidKeyException, IOException, UnsupportedEncodingException
password
- The password to decrypt.
IllegalBlockSizeException
- IllegalBlockSizeException
BadPaddingException
- BadPaddingException
InvalidKeyException
- InvalidKeyException
IOException
- IOException
UnsupportedEncodingException
- UnsupportedEncodingException
public static String decrypt(SecretKey secretKey, String password) throws BadPaddingException, IllegalBlockSizeException, InvalidKeyException, IOException, UnsupportedEncodingException
SecrectKey
.
secretKey
- SecretKey
used to decrypt the passwordpassword
- The password to decrypt.
IllegalBlockSizeException
- IllegalBlockSizeException
BadPaddingException
- BadPaddingException
InvalidKeyException
- InvalidKeyException
IOException
- IOException
UnsupportedEncodingException
- UnsupportedEncodingException
public static void setEncryptionKeySupplier(EncryptionKeySupplier supplier)
supplier
- the EncryptionKeySupplier
that is asked for a key
if has not been set so farpublic static SecretKey createSecretKey(String phrase)
SecretKey
based on the given key phrase.
phrase
- key phrase used to generate secret key
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |