public final class XMLEncryption
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
XML_ELEMENT_NAME |
| Modifier and Type | Method and Description |
|---|---|
static org.w3c.dom.Element |
decryptElement(org.w3c.dom.Element elemCrypt,
IMiscPasswordReader a_passwordReader) |
static org.w3c.dom.Element |
decryptElement(org.w3c.dom.Element elemCrypt,
java.lang.String password)
Decrypts an XML element
|
static boolean |
encryptElement(org.w3c.dom.Element elemPlain,
MyRSAPublicKey publicKey)
Encrypts an Element using a public key.
|
static org.w3c.dom.Element |
encryptElement(org.w3c.dom.Element elemPlain,
java.lang.String password)
Encrypts an element and all its children using PKCS#12 and the given password.
|
static org.w3c.dom.Node |
getEncryptedElement(org.w3c.dom.Element elemPlain,
MyRSAPublicKey publicKey)
Returns a node which is the encrypted version of elemPlain.
|
public static final java.lang.String XML_ELEMENT_NAME
public static org.w3c.dom.Element encryptElement(org.w3c.dom.Element elemPlain,
java.lang.String password)
throws java.lang.Exception
elemPlain - Element to be encrypted (not the DocumentElement!)password - String a passwordjava.lang.Exceptionpublic static org.w3c.dom.Element decryptElement(org.w3c.dom.Element elemCrypt,
java.lang.String password)
throws java.lang.Exception
elemCrypt - Elementpassword - Stringjava.lang.Exceptionpublic static org.w3c.dom.Element decryptElement(org.w3c.dom.Element elemCrypt,
IMiscPasswordReader a_passwordReader)
throws java.lang.Exception
java.lang.Exceptionpublic static boolean encryptElement(org.w3c.dom.Element elemPlain,
MyRSAPublicKey publicKey)
public static org.w3c.dom.Node getEncryptedElement(org.w3c.dom.Element elemPlain,
MyRSAPublicKey publicKey)
elemPlain - publicKey - Copyright © 2023. All rights reserved.