public interface PlexusCipher
Modifier and Type | Method and Description |
---|---|
Set<String> |
availableCiphers()
Returns the available cipher algorithms, never
null . |
String |
decorate(String str)
Decorates given string.
|
String |
decrypt(String alg,
String str,
String passPhrase)
Decrypt given Base64 encoded string with the given alg and passPhrase and return resulting string.
|
String |
decryptDecorated(String alg,
String str,
String passPhrase)
Decrypt given decorated Base64 encoded string with the given alg and passPhrase and return resulting string.
|
String |
encrypt(String alg,
String str,
String passPhrase)
Encrypt given string with the given alg and passPhrase and encode it into Base64 string.
|
String |
encryptAndDecorate(String alg,
String str,
String passPhrase)
Encrypt given string with the given alg and passPhrase and encode it into Base64 decorated string.
|
boolean |
isEncryptedString(String str)
Check if given string is decorated.
|
String |
unDecorate(String str)
Remove decorations from string, if it was decorated.
|
Set<String> availableCiphers()
null
.String encrypt(String alg, String str, String passPhrase) throws PlexusCipherException
alg
- cipher alg to use, never null
str
- string to encrypt, never null
passPhrase
- pass phrase, never null
null
PlexusCipherException
- if encryption failsString encryptAndDecorate(String alg, String str, String passPhrase) throws PlexusCipherException
alg
- cipher alg to use, never null
str
- string to encrypt, never null
passPhrase
- pass phrase, never null
null
PlexusCipherException
- if encryption failsString decrypt(String alg, String str, String passPhrase) throws PlexusCipherException
alg
- cipher alg to use, never null
str
- string to encrypt, never null
passPhrase
- pass phrase, never null
null
PlexusCipherException
- if encryption failsString decryptDecorated(String alg, String str, String passPhrase) throws PlexusCipherException
alg
- cipher alg to use, never null
str
- string to encrypt, never null
passPhrase
- pass phrase, never null
null
PlexusCipherException
- if encryption failsboolean isEncryptedString(String str)
String unDecorate(String str) throws PlexusCipherException
PlexusCipherException
- is string is malformedCopyright © 2001–2024 Codehaus Plexus. All rights reserved.