public interface EncryptionProvider
EncryptionProvier
is an interface for encrypting and
decrypting XML documents.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 certAlias)
Decrypts an XML Document that contains encrypted data.
|
Key |
decryptKey(Element encryptedKey,
String certAlias)
Decrypt the given encrypted key.
|
Document |
encryptAndReplace(Document doc,
Element element,
String secretKeyAlg,
int keyStrength,
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 keyStrength,
String certAlias,
int kekStrength)
Encrypts the given XML element in a given XML Context document.
|
Document |
encryptAndReplace(Document doc,
Element element,
String secretKeyAlg,
int keyStrength,
String certAlias,
int kekStrength,
String providerID)
Encrypts the given XML element in a given XML Context document.
|
Document |
encryptAndReplaceResourceID(Document doc,
Element element,
String secretKeyAlg,
int keyStrength,
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 keyStrength,
String certAlias,
int kekStrength,
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.
|
void |
initialize(KeyProvider keyProvider)
Initializes encryption provider.
|
void initialize(KeyProvider keyProvider) throws EncryptionException
EncryptionException
Document encryptAndReplace(Document doc, Element element, String secretKeyAlg, int keyStrength, String certAlias, int kekStrength) throws EncryptionException
doc
- the context XML Document.element
- Element to be encrypted.secretKeyAlg
- Encryption Key Algorithm.keyStrength
- Encryption Key Strength.certAlias
- KeyEncryption Key cert alias.kekStrength
- Key Encryption Key Strength.EncryptionException
Document encryptAndReplace(Document doc, Element element, String secretKeyAlg, int keyStrength, String certAlias, int kekStrength, String providerID) throws EncryptionException
doc
- the context XML Document.element
- Element to be encrypted.secretKeyAlg
- Encryption Key Algorithm.keyStrength
- Encryption Key Strength.certAlias
- KeyEncryption Key cert alias.kekStrength
- Key Encryption Key Strength.EncryptionException
Document encryptAndReplaceResourceID(Document doc, Element element, String secretKeyAlg, int keyStrength, String certAlias, int kekStrength, String providerID) throws EncryptionException
doc
- the context XML Document.element
- Element to be encrypted.secretKeyAlg
- Encryption Key Algorithm.keyStrength
- Encryption Key Strength.certAlias
- KeyEncryption Key cert alias.kekStrength
- Key Encryption Key Strength.EncryptionException
Document encryptAndReplace(Document doc, Element element, String secretKeyAlg, int keyStrength, Key kek, int kekStrength, String providerID) throws EncryptionException
doc
- the context XML Document.element
- Element to be encrypted.secretKeyAlg
- Encryption Key Algorithm.keyStrength
- Encryption Key Strength.kek
- Key Encryption Key.kekStrength
- Key Encryption Key StrengthproviderID
- Provider ID.EncryptionException
Document encryptAndReplaceResourceID(Document doc, Element element, String secretKeyAlg, int keyStrength, Key kek, int kekStrength, String providerID) throws EncryptionException
doc
- the context XML Document.element
- Element to be encrypted.secretKeyAlg
- Encryption Key Algorithm.keyStrength
- Encryption Key Strength.kek
- Key Encryption Key.kekStrength
- Key Encryption Key StrengthproviderID
- Provider ID.EncryptionException
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
Document decryptAndReplace(Document encryptedDoc, String certAlias) throws EncryptionException
encryptedDoc
- XML Document with encrypted data.certAlias
- Private Key Certificate Alias.EncryptionException
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.