|
DBAbstract API Documentation | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ro.raducora.utils.encryption.key.StreamEncryptionKey | +--ro.raducora.utils.encryption.key.DefaultEncryptionKey
Constructor Summary | |
DefaultEncryptionKey()
Sets the internal key with help from current system time |
|
DefaultEncryptionKey(long longkey)
Constructor that takes a "long" as argument |
|
DefaultEncryptionKey(java.lang.String strkey)
Constructor that takes a String as argument |
Method Summary | |
byte[] |
decrypt(byte[] toDecrypt,
int offset,
int length)
Takes an array of bytes and decrypts it |
byte[] |
encrypt(byte[] toEncrypt,
int offset,
int length)
Takes an array of bytes and encodes it with key |
boolean |
isExplicitlySet()
|
void |
reset()
Set Key to initial state. |
void |
setKey(java.lang.String key)
Set Key |
Methods inherited from class ro.raducora.utils.encryption.key.StreamEncryptionKey |
clone |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultEncryptionKey()
public DefaultEncryptionKey(long longkey)
public DefaultEncryptionKey(java.lang.String strkey)
Method Detail |
public boolean isExplicitlySet()
isExplicitlySet
in class StreamEncryptionKey
public void reset()
reset
in class StreamEncryptionKey
public void setKey(java.lang.String key)
setKey
in class StreamEncryptionKey
key
- the key to set.public byte[] encrypt(byte[] toEncrypt, int offset, int length)
encrypt
in class StreamEncryptionKey
toEncrypt
- byte array to encryptoffset
- where to beginlength
- where to end
public byte[] decrypt(byte[] toDecrypt, int offset, int length)
decrypt
in class StreamEncryptionKey
toDecrypt
- byte array to decryptoffset
- where to beginlength
- where to end
|
DBAbstract API Documentation | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |