org.gcube.common.utils.encryption
Interface Encrypter<T>

Type Parameters:
T - the type of the object to encrypt/decrypt
All Known Implementing Classes:
StringEncrypter, XMLDocumentEncrypter

public interface Encrypter<T>

Author:
Manuele Simi (CNR)

Method Summary
 T decrypt(T t, Key... key)
          Decrypts with the given key or the default key
 T encrypt(T t, Key... key)
          Encrypts with the given key or the default key
 

Method Detail

encrypt

T encrypt(T t,
          Key... key)
          throws Exception
Encrypts with the given key or the default key

Parameters:
t - the object to encrypt
key - the key
Returns:
the encrypted object
Throws:
Exception - if the key is not available, invalid or the object cannot be encrypted

decrypt

T decrypt(T t,
          Key... key)
          throws Exception
Decrypts with the given key or the default key

Parameters:
t - the object to decrypt
key - the key
Returns:
the decrypted object
Throws:
Exception - if the key is not available, invalid or the object cannot be decrypted


Copyright © 2014. All Rights Reserved.