|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ICipher
Defines the methods a cipher must implement. The cipher implementation must be thread-safe.
Method Summary | |
---|---|
byte[] |
decrypt(byte[] value)
Decrypts an array of bytes. |
String |
decrypt(String value)
Decrypts a string. |
byte[] |
encrypt(byte[] value)
Encrypts an array of bytes. |
String |
encrypt(String value)
Encrypts a string. |
Method Detail |
---|
String encrypt(String value)
value
- the original string.
IllegalArgumentException
- if value
is null
.String decrypt(String value) throws InvalidEncryptedValueException
value
- the encrypted string.
IllegalArgumentException
- if value
is null
.
InvalidEncryptedValueException
- if value
is
incompatible with this cipher (probably was not encrypted by it or
is corrupted).
UnsupportedOperationException
- if this is a one-way cipher and
does not support decryption.byte[] encrypt(byte[] value)
value
- the original value.
IllegalArgumentException
- if value
is null
.byte[] decrypt(byte[] value) throws InvalidEncryptedValueException
value
- the encrypted value.
UnsupportedOperationException
- if this is a one-way cipher and
does not support decryption.
IllegalArgumentException
- if value
is null
.
InvalidEncryptedValueException
- if value
is
incompatible with this cipher (probably was not encrypted by it or
is corrupted).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |