|
intarsys runtime library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.intarsys.tools.crypto.CryptoEnvironment
public class CryptoEnvironment
A tool class for handling en/decryption
| Method Summary | |
|---|---|
byte[] |
decrypt(byte[] bytes)
Decrypt a byte array which was previously encrypted using encrypt. |
String |
decryptEncoded(String value)
|
String |
decryptEncoded(String value,
ICryptdec cryptdec)
|
String |
decryptRaw(String value)
Decrypt a string which was previously encrypted using encrypt. |
byte[] |
encrypt(byte[] bytes)
Encrypt a clear text array of bytes. |
String |
encryptEncoded(char[] value)
|
String |
encryptEncoded(char[] value,
ICryptdec cryptdec)
|
String |
encryptEncoded(String value)
|
String |
encryptEncoded(String value,
ICryptdec cryptdec)
|
String |
encryptRaw(String value)
Encrypt a clear text array of chars. |
static CryptoEnvironment |
get()
|
ICryptdec |
getDefaultCryptdecDecrypt()
|
ICryptdec |
getDefaultCryptdecEncrypt()
|
ICryptdec |
lookupCryptdec(String id)
|
void |
registerCryptdec(ICryptdec cryptdec)
|
void |
setDefaultCryptdecDecrypt(ICryptdec defaultCryptdec)
|
void |
setDefaultCryptdecEncrypt(ICryptdec defaultCryptdec)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static CryptoEnvironment get()
public byte[] decrypt(byte[] bytes)
throws IOException
encrypt. For decryption the default ICryptdec is
used.
bytes -
bytes
IOException
public String decryptEncoded(String value)
throws IOException
IOException
public String decryptEncoded(String value,
ICryptdec cryptdec)
throws IOException
IOException
public String decryptRaw(String value)
throws IOException
encrypt. Provided the same salt and passphrase are used for
initialization, this method returns the original unencrypted input.
value -
value
IOException
public byte[] encrypt(byte[] bytes)
throws IOException
bytes -
bytes
IOException
public String encryptEncoded(char[] value)
throws IOException
IOException
public String encryptEncoded(char[] value,
ICryptdec cryptdec)
throws IOException
IOException
public String encryptEncoded(String value)
throws IOException
IOException
public String encryptEncoded(String value,
ICryptdec cryptdec)
throws IOException
IOException
public String encryptRaw(String value)
throws IOException
value -
value
IOExceptionpublic ICryptdec getDefaultCryptdecDecrypt()
public ICryptdec getDefaultCryptdecEncrypt()
public ICryptdec lookupCryptdec(String id)
public void registerCryptdec(ICryptdec cryptdec)
public void setDefaultCryptdecDecrypt(ICryptdec defaultCryptdec)
public void setDefaultCryptdecEncrypt(ICryptdec defaultCryptdec)
|
intarsys runtime library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||