public class WSSecDKEncrypt extends WSSecDerivedKeyBase
documentattachmentCallbackHandler, callbackLookup, doDebug, keyIdentifierType, password, user| Constructor and Description |
|---|
WSSecDKEncrypt() |
| Modifier and Type | Method and Description |
|---|---|
void |
addExternalRefElement(Element referenceList,
WSSecHeader secHeader)
Adds (prepends) the external Reference element to the Security header.
|
Document |
build(Document doc,
WSSecHeader secHeader) |
Element |
encrypt() |
Element |
encryptForExternalRef(Element dataRef,
List<WSEncryptionPart> references)
Encrypt one or more parts or elements of the message (external).
|
protected int |
getDerivedKeyLength()
The derived key will change depending on the sig/encr algorithm.
|
void |
setDerivedKeyLength(int keyLength) |
void |
setSymmetricEncAlgorithm(String algo)
Set the symmetric encryption algorithm URI to use
|
appendDKElementToHeader, getDerivedKey, getdktElement, getId, getTokenIdentifier, getWscVersion, prepare, prependDKElementToHeader, setClientLabel, setCrypto, setCustomValueType, setExternalKey, setExternalKey, setServiceLabel, setTokenIdDirectId, setWscVersion, setX509CertificateaddReferencesToSign, createSTRParameter, getInclusivePrefixes, getInclusivePrefixesgetIdAllocator, getKeyIdentifierType, getParts, setAttachmentCallbackHandler, setBodyID, setCallbackLookup, setIdAllocator, setKeyIdentifierType, setUserInfo, setWsuIdpublic Document build(Document doc, WSSecHeader secHeader) throws WSSecurityException
WSSecurityExceptionpublic Element encrypt() throws WSSecurityException
WSSecurityExceptionpublic Element encryptForExternalRef(Element dataRef, List<WSEncryptionPart> references) throws WSSecurityException
WSEncryptionPart object that
contain information about the elements to encrypt. The method call the
encryption method, takes the reference information generated during
encryption and add this to the xenc:Reference element.
This method can be called after prepare() and can be
called multiple times to encrypt a number of parts or elements.
The method generates a xenc:Reference element that must
be added to the SecurityHeader. See addExternalRefElement().
If the dataRef parameter is null the method
creates and initializes a new Reference element.dataRef - A xenc:Reference element or nullreferences - A list containing WSEncryptionPart objectsxenc:Reference elementWSSecurityExceptionpublic void addExternalRefElement(Element referenceList, WSSecHeader secHeader)
encryptForExternalRef() method. The method adds the
reference element in the SecurityHeader.referenceList - The external enc:Reference elementsecHeader - The security header.public void setSymmetricEncAlgorithm(String algo)
algo - the symmetric encryption algorithm URI to useprotected int getDerivedKeyLength()
throws WSSecurityException
WSSecDerivedKeyBasegetDerivedKeyLength in class WSSecDerivedKeyBaseWSSecurityExceptionpublic void setDerivedKeyLength(int keyLength)
Copyright © 2004–2015 The Apache Software Foundation. All rights reserved.