org.sonatype.plexus.components.cipher

## Interface PlexusCipher

- All Known Implementing Classes:
    DefaultPlexusCipher

      public interface PlexusCipher

  Author:
    Oleg Gusakov

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static char` | `ENCRYPTED_STRING_DECORATION_START`
    `static char` | `ENCRYPTED_STRING_DECORATION_STOP`

  - ### Method Summary

    Methods
    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
    `boolean` | `isEncryptedString(String str)` check if given string is decorated
    `String` | `unDecorate(String str)` return string inside decorations

- - ### Field Detail

    - #### 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

          String encrypt(String str,
                       String passPhrase)
                         throws PlexusCipherException

      encrypt given string with the given passPhrase and encode it into base64
      Parameters:
        `str` -
        `passPhrase` -
      Returns:
      Throws:
        `PlexusCipherException`

    - #### encryptAndDecorate

          String encryptAndDecorate(String str,
                                  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

          String decrypt(String str,
                       String passPhrase)
                         throws PlexusCipherException

      decrypt given base64 encrypted string
      Parameters:
        `str` -
        `passPhrase` -
      Returns:
      Throws:
        `PlexusCipherException`

    - #### decryptDecorated

          String decryptDecorated(String str,
                                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(String str)

      check if given string is decorated
      Parameters:
        `str` -
      Returns:

    - #### unDecorate

          String unDecorate(String str)
                            throws PlexusCipherException

      return string inside decorations
      Parameters:
        `str` -
      Returns:
      Throws:
        `PlexusCipherException`

    - #### decorate

          String decorate(String str)

      decorated given string with { and }
      Parameters:
        `str` -
      Returns:

Copyright © 2015. All rights reserved.