StringEncrypter (EncryptionLibrary 1.0.2-3.1.0 API)
Date: 2014-05-10

org.gcube.common.utils.encryption

## Class StringEncrypter

- java.lang.Object
- - org.gcube.common.utils.encryption.StringEncrypter

- All Implemented Interfaces:
    Encrypter<String>

      public class StringEncrypter
      extends Object
      implements Encrypter<String>

  Encrypter for `String` objects
  Author:
    Manuele Simi (CNR)

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `decrypt(String string, Key... key)` Decrypts the string with the given key
    `String` | `encrypt(String string, Key... key)` Encrypts the string with the given key
    `static StringEncrypter` | `getEncrypter()` Gets the Encrypter for `String`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getEncrypter

          public static StringEncrypter getEncrypter()

      Gets the Encrypter for `String`
      Returns:
        the encrypter

    - #### encrypt

          public String encrypt(String string,
                       Key... key)
                         throws Exception

      Encrypts the string with the given key
      Specified by:
        `encrypt` in interface `Encrypter<String>`
      Parameters:
        `key` - the key for encrypting
        `string` - the object to encrypt
      Returns:
        the encrypted string in a Base64 encoding
      Throws:
        `Exception`

    - #### decrypt

          public String decrypt(String string,
                       Key... key)
                         throws Exception

      Decrypts the string with the given key
      Specified by:
        `decrypt` in interface `Encrypter<String>`
      Parameters:
        `key` - the key to use for decrypting
        `string` - the object to decrypt
      Returns:
        the decripted string
      Throws:
        `Exception`

Copyright © 2014. All Rights Reserved.