XMLDocumentEncrypter (EncryptionLibrary 1.0.2-2.16.0 API)
Date: 2013-07-30

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 XMLDocumentEncrypter

    java.lang.Object
      org.gcube.common.utils.encryption.XMLDocumentEncrypter

All Implemented Interfaces:
  Encrypter<Element>

    public class XMLDocumentEncrypter

extends Object
implements Encrypter<Element>

Encrypter for `Element` objects

Author:
  Manuele Simi (CNR)

Method Summary
`Element` | `decrypt(Element encryptedDataElement, Key... key)` Decrypts the element and all its descendants (if any)
`Element` | `encrypt(Element element, Key... key)` Encrypts the element with the given key or the default key
`static XMLDocumentEncrypter` | `getEncrypter()` Gets the Encrypter for `Element`s
`void` | `setEncryptElementNames(boolean encryptElementNames)` Decides if the element names must be also encrypted or only their content

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getEncrypter

    public static XMLDocumentEncrypter getEncrypter()

  Gets the Encrypter for `Element`s

  Returns:
    the encrypter

### decrypt

    public Element decrypt(Element encryptedDataElement,
                           Key... key)
                    throws Exception

  Decrypts the element and all its descendants (if any)

  Specified by:
    `decrypt` in interface `Encrypter<Element>`
  Parameters:
    `encryptedDataElement` - 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

### encrypt

    public Element encrypt(Element element,
                           Key... key)
                    throws Exception

  Encrypts the element with the given key or the default key

  Specified by:
    `encrypt` in interface `Encrypter<Element>`
  Parameters:
    `element` - 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

### setEncryptElementNames

    public void setEncryptElementNames(boolean encryptElementNames)

  Decides if the element names must be also encrypted or only their content

  Parameters:
    `encryptElementNames`true`` - if the element names have to be encrypted, `false` if only their content has to be

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.