Package com.sun.identity.wss.xmlenc
Class WSSEncryptionProvider
- java.lang.Object
-
- com.sun.identity.xmlenc.AMEncryptionProvider
-
- com.sun.identity.wss.xmlenc.WSSEncryptionProvider
-
- All Implemented Interfaces:
EncryptionProvider
public class WSSEncryptionProvider extends AMEncryptionProvider
WSSEncryptionProvideris a class for encrypting and decrypting WSS XML Documents which implementsAMEncryptionProvider.
-
-
Field Summary
-
Fields inherited from class com.sun.identity.xmlenc.AMEncryptionProvider
keyMap, keyProvider
-
-
Constructor Summary
Constructors Constructor Description WSSEncryptionProvider()Creates a new instance of WSSEncryptionProvider
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KeydecryptKey(Element encryptedKey, String certAlias)Decrypt the given encrypted key.DocumentencryptAndReplaceWSSElements(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.-
Methods inherited from class com.sun.identity.xmlenc.AMEncryptionProvider
decryptAndReplace, decryptAndReplace, encryptAndReplace, encryptAndReplace, encryptAndReplace, encryptAndReplaceResourceID, encryptAndReplaceResourceID, generateSecretKey, getEncryptionAlgorithm, getPrivateKey, initialize
-
-
-
-
Method Detail
-
encryptAndReplaceWSSElements
public Document encryptAndReplaceWSSElements(Document doc, Map elmMap, String encDataEncAlg, int encDataEncAlgStrength, String certAlias, int kekStrength, String tokenType, String providerID) throws EncryptionException
Encrypts the given WSS XML element in a given XML Context document.- Specified by:
encryptAndReplaceWSSElementsin interfaceEncryptionProvider- Overrides:
encryptAndReplaceWSSElementsin classAMEncryptionProvider- Parameters:
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.- Returns:
- org.w3c.dom.Document XML Document replaced with encrypted data for a given XML element.
- Throws:
EncryptionException
-
decryptKey
public Key decryptKey(Element encryptedKey, String certAlias)
Decrypt the given encrypted key.- Specified by:
decryptKeyin interfaceEncryptionProvider- Overrides:
decryptKeyin classAMEncryptionProvider- Parameters:
encryptedKey- the encrypted key elementcertAlias- the private key alias- Returns:
- the key associated with the decrypted key.
-
-