public class XMLEncryptionManager extends Object
Modifier | Constructor and Description |
---|---|
protected |
XMLEncryptionManager()
Constructor
|
protected |
XMLEncryptionManager(EncryptionProvider encProvider,
KeyProvider keyProvider)
Constructor
|
Modifier and Type | Method and Description |
---|---|
Document |
decryptAndReplace(Document encryptedDoc,
Key privKey)
Decrypts an XML Document that contains encrypted data.
|
Document |
decryptAndReplace(Document encryptedDoc,
String kekAlias)
Decrypts and replaces the XML element in a given XML DOM Document.
|
Key |
decryptKey(Element encryptedKey,
String certAlias)
Decrypts key and returns the associated secret key.
|
Document |
encryptAndReplace(Document doc,
Element element,
String secretKeyAlg,
int keySize,
Key kek,
int kekStrength)
Encrypts the given XML element in a given XML Context document.
|
Document |
encryptAndReplace(Document doc,
Element element,
String secretKeyAlg,
int keySize,
Key kek,
int kekStrength,
String providerID)
Encrypts the given XML element in a given XML Context document.
|
Document |
encryptAndReplace(Document doc,
Element element,
String secretKeyAlg,
int keySize,
String certAlias)
Encrypts the given XML element in a given XML Context document.
|
Document |
encryptAndReplace(Document doc,
Element element,
String secretKeyAlg,
int keySize,
String certAlias,
int kekStrength)
Encrypts the given XML element in a given XML Context document.
|
Document |
encryptAndReplace(Document doc,
Element element,
String secretKeyAlg,
int keySize,
String certAlias,
String providerID)
Encrypts the given XML element in a given XML Context document.
|
Document |
encryptAndReplaceResourceID(Document doc,
Element element,
String secretKeyAlg,
int keySize,
Key kek,
int kekStrength,
String providerID)
Encrypts the given XML element in a given XML Context document.
|
Document |
encryptAndReplaceResourceID(Document doc,
Element element,
String secretKeyAlg,
int keySize,
String certAlias,
String providerID)
Encrypts the given ResourceID XML element in a given XML Context
document.
|
Document |
encryptAndReplaceWSSElements(Document doc,
Map elmMap,
String encDataEncAlg,
int encDataEncAlgStrength,
String certAlias,
int kekStrength,
String tokenType,
String providerID)
Encrypts the given WSS XML element in a given XML Context document.
|
static XMLEncryptionManager |
getInstance()
Gets the instance of
XMLEncryptionManager with default
KeyProvider and EncryptionProvider . |
static XMLEncryptionManager |
getInstance(EncryptionProvider encProvider,
KeyProvider keyProvider)
Gets the instance of
XMLEncryptionManager with given
KeyProvider and EncryptionProvider . |
protected XMLEncryptionManager()
protected XMLEncryptionManager(EncryptionProvider encProvider, KeyProvider keyProvider)
public static XMLEncryptionManager getInstance()
XMLEncryptionManager
with default
KeyProvider
and EncryptionProvider
.XMLEncryptionManager
public static XMLEncryptionManager getInstance(EncryptionProvider encProvider, KeyProvider keyProvider)
XMLEncryptionManager
with given
KeyProvider
and EncryptionProvider
.XMLEncryptionManager
public Document encryptAndReplace(Document doc, Element element, String secretKeyAlg, int keySize, String certAlias) throws EncryptionException
doc
- the context XML Document.element
- Element to be encrypted.secretKeyAlg
- Encryption Key Algorithm.keySize
- Encryption key sizecertAlias
- KeyEncryption Key cert alias.EncryptionException
public Document encryptAndReplace(Document doc, Element element, String secretKeyAlg, int keySize, String certAlias, String providerID) throws EncryptionException
doc
- the context XML Document.element
- Element to be encrypted.secretKeyAlg
- Encryption Key Algorithm.keySize
- Encryption key sizecertAlias
- KeyEncryption Key cert alias.providerID
- Unique provider ID.EncryptionException
public Document encryptAndReplaceResourceID(Document doc, Element element, String secretKeyAlg, int keySize, String certAlias, String providerID) throws EncryptionException
doc
- the context XML Document.element
- Element to be encrypted.secretKeyAlg
- Encryption Key Algorithm.keySize
- Encryption key sizecertAlias
- KeyEncryption Key cert alias.providerID
- Unique provider ID.EncryptionException
public Document encryptAndReplace(Document doc, Element element, String secretKeyAlg, int keySize, String certAlias, int kekStrength) throws EncryptionException
doc
- the context XML Document.element
- Element to be encrypted.secretKeyAlg
- Encryption Key Algorithm.keySize
- Encryption key sizecertAlias
- KeyEncryption Key cert alias.kekStrength
- Key Encryption Key Strength.EncryptionException
public Document encryptAndReplace(Document doc, Element element, String secretKeyAlg, int keySize, Key kek, int kekStrength) throws EncryptionException
doc
- the context XML Document.element
- Element to be encrypted.secretKeyAlg
- Encryption Key Algorithm.keySize
- Encryption Key Strength.kek
- Key Encryption Key.kekStrength
- Key Encryption Key StrengthEncryptionException
public Document encryptAndReplace(Document doc, Element element, String secretKeyAlg, int keySize, Key kek, int kekStrength, String providerID) throws EncryptionException
doc
- the context XML Document.element
- Element to be encrypted.secretKeyAlg
- Encryption Key Algorithm.keySize
- Encryption Key Strength.kek
- Key Encryption Key.kekStrength
- Key Encryption Key StrengthproviderID
- provider entityIDEncryptionException
public Document encryptAndReplaceResourceID(Document doc, Element element, String secretKeyAlg, int keySize, Key kek, int kekStrength, String providerID) throws EncryptionException
doc
- the context XML Document.element
- Element to be encrypted.secretKeyAlg
- Encryption Key Algorithm.keySize
- Encryption Key Strength.kek
- Key Encryption Key.kekStrength
- Key Encryption Key StrengthEncryptionException
public Document encryptAndReplaceWSSElements(Document doc, Map elmMap, String encDataEncAlg, int encDataEncAlgStrength, String certAlias, int kekStrength, String tokenType, String providerID) throws EncryptionException
doc
- the context XML Document.elmMap
- Map of (Element, wsu_id) to be encrypted.encDataEncAlg
- Encryption Key Algorithm.encDataEncAlgStrength
- Encryption Key Strength.certAlias
- Key Encryption Key cert alias.kekStrength
- Key Encryption Key Strength.tokenType
- Security token type.providerID
- Provider ID.EncryptionException
public Document decryptAndReplace(Document encryptedDoc, String kekAlias) throws EncryptionException
encryptedDoc
- Encrypted XML Document.kekAlias
- Key Encryption Key Cert Alias.XMLEncryptionException
EncryptionException
public Document decryptAndReplace(Document encryptedDoc, Key privKey) throws EncryptionException
encryptedDoc
- XML Document with encrypted data.privKey
- Key Encryption Key used for encryption.EncryptionException
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.