org.sonatype.plexus.components.cipher

## Interface PlexusCipher

All Known Implementing Classes:
  DefaultPlexusCipher

    public interface PlexusCipher

Author:
  Oleg Gusakov

### Field Summary

Fields
`static char` `ENCRYPTED_STRING_DECORATION_START`
`static char` `ENCRYPTED_STRING_DECORATION_STOP`
`static java.lang.String` `ROLE`

### Method Summary

Methods
`java.lang.String` `decorate(java.lang.String str)` decorated given string with { and }
`java.lang.String` `decrypt(java.lang.String str, java.lang.String passPhrase)` decrypt given base64 encrypted string
`java.lang.String` `decryptDecorated(java.lang.String str, java.lang.String passPhrase)` decrypt given base64 encoded encrypted string.
`java.lang.String` `encrypt(java.lang.String str, java.lang.String passPhrase)` encrypt given string with the given passPhrase and encode it into base64
`java.lang.String` `encryptAndDecorate(java.lang.String str, java.lang.String passPhrase)` encrypt given string with the given passPhrase, encode it into base64 and return result, wrapped into { } decorations
`boolean` `isEncryptedString(java.lang.String str)` check if given string is decorated
`java.lang.String` `unDecorate(java.lang.String str)` return string inside decorations

### Field Detail

#### ROLE

    static final java.lang.String ROLE

#### ENCRYPTED_STRING_DECORATION_START

    static final char ENCRYPTED_STRING_DECORATION_START

See Also:
  Constant Field Values

#### ENCRYPTED_STRING_DECORATION_STOP

    static final char ENCRYPTED_STRING_DECORATION_STOP

See Also:
  Constant Field Values

### Method Detail

#### encrypt

    java.lang.String encrypt(java.lang.String str,
                           java.lang.String passPhrase)
                             throws PlexusCipherException

encrypt given string with the given passPhrase and encode it into base64

Parameters:
  `str` -
  `passPhrase` -
Returns:
Throws:
  `PlexusCipherException`

#### encryptAndDecorate

    java.lang.String encryptAndDecorate(java.lang.String str,
                                      java.lang.String passPhrase)
                                        throws PlexusCipherException

encrypt given string with the given passPhrase, encode it into base64 and return result, wrapped into { } decorations

Parameters:
  `str` -
  `passPhrase` -
Returns:
Throws:
  `PlexusCipherException`

#### decrypt

    java.lang.String decrypt(java.lang.String str,
                           java.lang.String passPhrase)
                             throws PlexusCipherException

decrypt given base64 encrypted string

Parameters:
  `str` -
  `passPhrase` -
Returns:
Throws:
  `PlexusCipherException`

#### decryptDecorated

    java.lang.String decryptDecorated(java.lang.String str,
                                    java.lang.String passPhrase)
                                      throws PlexusCipherException

decrypt given base64 encoded encrypted string. If string is decorated, decrypt base64 encoded string inside decorations

Parameters:
  `str` -
  `passPhrase` -
Returns:
Throws:
  `PlexusCipherException`

#### isEncryptedString

    boolean isEncryptedString(java.lang.String str)

check if given string is decorated

Parameters:
  `str` -
Returns:

#### unDecorate

    java.lang.String unDecorate(java.lang.String str)
                                throws PlexusCipherException

return string inside decorations

Parameters:
  `str` -
Returns:
Throws:
  `PlexusCipherException`

#### decorate

    java.lang.String decorate(java.lang.String str)

decorated given string with { and }

Parameters:
  `str` -
Returns: