@Named(value="default") @Typed(value=PlexusCipher.class) public class DefaultPlexusCipher extends Object implements PlexusCipher
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 DefaultPlexusCipher() throws PlexusCipherException
PlexusCipherException
public String encrypt(String str, String passPhrase) throws PlexusCipherException
PlexusCipher
encrypt
in interface PlexusCipher
PlexusCipherException
public String encryptAndDecorate(String str, String passPhrase) throws PlexusCipherException
PlexusCipher
encryptAndDecorate
in interface PlexusCipher
PlexusCipherException
public String decrypt(String str, String passPhrase) throws PlexusCipherException
PlexusCipher
decrypt
in interface PlexusCipher
PlexusCipherException
public String decryptDecorated(String str, String passPhrase) throws PlexusCipherException
PlexusCipher
decryptDecorated
in interface PlexusCipher
PlexusCipherException
public boolean isEncryptedString(String str)
PlexusCipher
isEncryptedString
in interface PlexusCipher
public String unDecorate(String str) throws PlexusCipherException
PlexusCipher
unDecorate
in interface PlexusCipher
PlexusCipherException
public String decorate(String str)
PlexusCipher
decorate
in interface PlexusCipher
public static String[] getServiceTypes()
public static String[] getCryptoImpls(String serviceType)
public static void main(String[] args)
Copyright © 2008-2014 Sonatype, Inc.. All Rights Reserved.