Interface PlexusCipher
- All Known Implementing Classes:
DefaultPlexusCipher
public interface PlexusCipher
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final char
static final char
-
Method Summary
Modifier and TypeMethodDescriptiondecorated given string with { and }decrypt given base64 encrypted stringdecryptDecorated
(String str, String passPhrase) decrypt given base64 encoded encrypted string.encrypt given string with the given passPhrase and encode it into base64encryptAndDecorate
(String str, String passPhrase) encrypt given string with the given passPhrase, encode it into base64 and return result, wrapped into { } decorationsboolean
isEncryptedString
(String str) check if given string is decoratedunDecorate
(String str) return string inside decorations
-
Field Details
-
ENCRYPTED_STRING_DECORATION_START
static final char ENCRYPTED_STRING_DECORATION_START- See Also:
-
ENCRYPTED_STRING_DECORATION_STOP
static final char ENCRYPTED_STRING_DECORATION_STOP- See Also:
-
-
Method Details
-
encrypt
encrypt given string with the given passPhrase and encode it into base64- Parameters:
str
-passPhrase
-- Returns:
- encrypted str
- Throws:
PlexusCipherException
-
encryptAndDecorate
encrypt given string with the given passPhrase, encode it into base64 and return result, wrapped into { } decorations- Parameters:
str
-passPhrase
-- Returns:
- encrypted and decorated str
- Throws:
PlexusCipherException
-
decrypt
decrypt given base64 encrypted string- Parameters:
str
-passPhrase
-- Returns:
- decrypted str
- Throws:
PlexusCipherException
-
decryptDecorated
decrypt given base64 encoded encrypted string. If string is decorated, decrypt base64 encoded string inside decorations- Parameters:
str
-passPhrase
-- Returns:
- decrypted decorated str
- Throws:
PlexusCipherException
-
isEncryptedString
check if given string is decorated- Parameters:
str
-- Returns:
- true if string is encrypted
-
unDecorate
return string inside decorations- Parameters:
str
-- Returns:
- undecorated str
- Throws:
PlexusCipherException
-
decorate
decorated given string with { and }- Parameters:
str
-- Returns:
- decorated str
-