@Singleton @Named(value="default") @Typed(value=PlexusCipher.class) public class DefaultPlexusCipher extends Object implements PlexusCipher
PlexusCipher. This class is thread safe.ENCRYPTED_STRING_DECORATION_START, ENCRYPTED_STRING_DECORATION_STOP| Constructor and Description |
|---|
DefaultPlexusCipher() |
| Modifier and Type | Method and Description |
|---|---|
String |
decorate(String str)
decorated given string with { and }
|
String |
decrypt(String str,
String passPhrase)
decrypt given base64 encrypted string
|
String |
decryptDecorated(String str,
String passPhrase)
decrypt given base64 encoded encrypted string.
|
String |
encrypt(String str,
String passPhrase)
encrypt given string with the given passPhrase and encode it into base64
|
String |
encryptAndDecorate(String str,
String passPhrase)
encrypt given string with the given passPhrase, encode it into base64 and return result, wrapped into { }
decorations
|
static String[] |
getCryptoImpls(String serviceType)
This method returns the available implementations for a service type
|
static String[] |
getServiceTypes()
Exploratory part.
|
boolean |
isEncryptedString(String str)
check if given string is decorated
|
static void |
main(String[] args) |
String |
unDecorate(String str)
return string inside decorations
|
public String encrypt(String str, String passPhrase) throws PlexusCipherException
PlexusCipherencrypt in interface PlexusCipherPlexusCipherExceptionpublic String encryptAndDecorate(String str, String passPhrase) throws PlexusCipherException
PlexusCipherencryptAndDecorate in interface PlexusCipherPlexusCipherExceptionpublic String decrypt(String str, String passPhrase) throws PlexusCipherException
PlexusCipherdecrypt in interface PlexusCipherPlexusCipherExceptionpublic String decryptDecorated(String str, String passPhrase) throws PlexusCipherException
PlexusCipherdecryptDecorated in interface PlexusCipherPlexusCipherExceptionpublic boolean isEncryptedString(String str)
PlexusCipherisEncryptedString in interface PlexusCipherpublic String unDecorate(String str) throws PlexusCipherException
PlexusCipherunDecorate in interface PlexusCipherPlexusCipherExceptionpublic String decorate(String str)
PlexusCipherdecorate in interface PlexusCipherpublic static String[] getServiceTypes()
public static String[] getCryptoImpls(String serviceType)
public static void main(String[] args)
Copyright © 2001–2021 Codehaus Plexus. All rights reserved.