StringEncrypter (EncryptionLibrary 1.0.2-2.12.0 API)
Date: 2013-02-16

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2013. All Rights Reserved.