public final class EncryptionUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static WSDataRef |
decryptEncryptedData(Document doc,
String dataRefURI,
Element encData,
SecretKey symmetricKey,
String symEncAlgo,
CallbackHandler attachmentCallbackHandler)
Decrypt the EncryptedData argument using a SecretKey.
|
static WSDataRef |
decryptEncryptedData(Document doc,
String dataRefURI,
Element encData,
SecretKey symmetricKey,
String symEncAlgo,
CallbackHandler attachmentCallbackHandler,
org.apache.xml.security.encryption.Serializer encryptionSerializer)
Decrypt the EncryptedData argument using a SecretKey.
|
static Element |
findEncryptedDataElement(Document doc,
WSDocInfo wsDocInfo,
String dataRefURI)
Look up the encrypted data.
|
static Element |
getCipherValueFromEncryptedData(Element encData) |
static byte[] |
getDecodedBase64EncodedData(Element element)
Method getDecodedBase64EncodedData
|
static String |
getDigestAlgorithm(Node encBodyData) |
static String |
getMGFAlgorithm(Node encBodyData) |
static byte[] |
getPSource(Node encBodyData) |
static String |
getXOPURIFromCipherValue(Element cipherValue) |
static String |
getXPath(Node decryptedNode) |
public static Element findEncryptedDataElement(Document doc, WSDocInfo wsDocInfo, String dataRefURI) throws WSSecurityException
doc - The document in which to find EncryptedDatawsDocInfo - The WSDocInfo object to usedataRefURI - The URI of EncryptedDataWSSecurityException - if the EncryptedData element referenced by dataRefURI is
not foundpublic static WSDataRef decryptEncryptedData(Document doc, String dataRefURI, Element encData, SecretKey symmetricKey, String symEncAlgo, CallbackHandler attachmentCallbackHandler) throws WSSecurityException
doc - The (document) owner of EncryptedDatadataRefURI - The URI of EncryptedDataencData - The EncryptedData elementsymmetricKey - The SecretKey with which to decrypt EncryptedDatasymEncAlgo - The symmetric encryption algorithm to useattachmentCallbackHandler - The CallbackHandler from which to get attachmentsWSSecurityExceptionpublic static WSDataRef decryptEncryptedData(Document doc, String dataRefURI, Element encData, SecretKey symmetricKey, String symEncAlgo, CallbackHandler attachmentCallbackHandler, org.apache.xml.security.encryption.Serializer encryptionSerializer) throws WSSecurityException
doc - The (document) owner of EncryptedDatadataRefURI - The URI of EncryptedDataencData - The EncryptedData elementsymmetricKey - The SecretKey with which to decrypt EncryptedDatasymEncAlgo - The symmetric encryption algorithm to useattachmentCallbackHandler - The CallbackHandler from which to get attachmentsWSSecurityExceptionpublic static Element getCipherValueFromEncryptedData(Element encData)
public static String getXPath(Node decryptedNode)
decryptedNode - the decrypted nodenull otherwisepublic static String getDigestAlgorithm(Node encBodyData) throws WSSecurityException
WSSecurityExceptionpublic static String getMGFAlgorithm(Node encBodyData) throws WSSecurityException
WSSecurityExceptionpublic static byte[] getPSource(Node encBodyData) throws WSSecurityException
WSSecurityExceptionpublic static byte[] getDecodedBase64EncodedData(Element element) throws WSSecurityException
element - WSSecurityExceptionCopyright © 2017 JBoss by Red Hat. All rights reserved.