|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CryptoAlgorithm
This interface describes the various Crypto Algorithms that are handed out by the Crypto Service.
Method Summary | |
---|---|
String |
encrypt(String value)
Performs the actual encryption. |
void |
setCipher(String cipher)
Algorithms that perform multiple ciphers get told with setCipher, which cipher to use. |
void |
setSeed(String salt)
Allows the user to set a salt value whenever the algorithm is used. |
Method Detail |
---|
void setSeed(String salt)
Algorithms that do not use a salt are allowed to ignore this parameter.
Algorithms must be able to deal with the null value as salt. They should treat it as "use a random salt".
salt
- The salt valueString encrypt(String value) throws Exception
value
- The value to be encrypted
Exception
- various errors from the underlying ciphers.
The caller should catch them and report accordingly.void setCipher(String cipher)
cipher
- The cipher to use.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |