Encryption enc = absec.getEncryption();
EncryptionOptions options = enc.getDefaultEncryptionOptions();
options.setDataEncryptionKey(key);
// Encrypt the document using the generated key
Document enc_doc = enc.encrypt(entry.getDocument(), options);
assertEquals(new QName("http://www.w3.org/2001/04/xmlenc#", "EncryptedData"), enc_doc.getRoot().getQName());
// Decrypt the document using the generated key
Document<Entry> entry_doc = enc.decrypt(enc_doc, options);