Package com.sun.xml.wss.impl.policy.mls
Class SymmetricKeyBinding
java.lang.Object
com.sun.xml.wss.impl.policy.MLSPolicy
com.sun.xml.wss.impl.policy.mls.WSSPolicy
com.sun.xml.wss.impl.policy.mls.KeyBindingBase
com.sun.xml.wss.impl.policy.mls.SymmetricKeyBinding
- All Implemented Interfaces:
SecurityPolicy,Cloneable
A policy representing a SymmetricKey that can be used as the
KeyBinding for a SignaturePolicy or an EncryptionPolicy.
-
Field Summary
Fields inherited from class com.sun.xml.wss.impl.policy.mls.KeyBindingBase
claims, claimsDialect, INCLUDE_ALWAYS, INCLUDE_ALWAYS_TO_RECIPIENT, INCLUDE_ALWAYS_TO_RECIPIENT_VER2, INCLUDE_ALWAYS_VER2, INCLUDE_NEVER, INCLUDE_NEVER_VER2, INCLUDE_ONCE, INCLUDE_ONCE_VER2, includeToken, issuer, policyTokenFields inherited from class com.sun.xml.wss.impl.policy.mls.WSSPolicy
_featureBinding, _isOptional, _keyBinding, _policyIdentifier, bsp, UUID -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorSymmetricKeyBinding(String keyIdentifier, String keyAlgorithm) -
Method Summary
Modifier and TypeMethodDescriptionclone()Clone operatorbooleanequals operatorbooleanequalsIgnoreTargets(WSSPolicy binding) getType()Get the type of the policy.booleanCreate and set the KeyBinding for this WSSPolicy to an X509CertificateBindingvoidsetCertAlias(String certAlias) voidsetKeyAlgorithm(String keyAlgorithm) set the Key Algorithm of the Symmetric KeyvoidsetKeyIdentifier(String keyIdentifier) set the key identifier for the symmetric keyvoidsetSecretKey(SecretKey secretKey) Set the symmetric keyvoidsetUseReceivedSecret(boolean useReceivedSecret) toString()booleanvoidusesEKSHA1KeyBinding(boolean value) Methods inherited from class com.sun.xml.wss.impl.policy.mls.KeyBindingBase
getClaims, getIncludeToken, getIssuer, policyTokenWasSet, setClaims, setIncludeToken, setIssuer, setPolicyTokenFlagMethods inherited from class com.sun.xml.wss.impl.policy.mls.WSSPolicy
getFeatureBinding, getKeyBinding, getPolicyIdentifier, getUUID, isBSP, isBSP, isOptional, isOptional, setFeatureBinding, setKeyBinding, setPolicyIdentifier, setUUIDMethods inherited from class com.sun.xml.wss.impl.policy.MLSPolicy
isReadOnly, isReadOnly
-
Constructor Details
-
SymmetricKeyBinding
public SymmetricKeyBinding()Default constructor -
SymmetricKeyBinding
- Parameters:
keyIdentifier- identifier for KeykeyAlgorithm- Key Algorithm
-
-
Method Details
-
setKeyIdentifier
set the key identifier for the symmetric key- Parameters:
keyIdentifier-
-
getKeyIdentifier
- Returns:
- key identifier for the symmetric key
-
setCertAlias
-
getCertAlias
-
setUseReceivedSecret
public void setUseReceivedSecret(boolean useReceivedSecret) -
getUseReceivedSecret
public boolean getUseReceivedSecret() -
setKeyAlgorithm
set the Key Algorithm of the Symmetric Key- Parameters:
keyAlgorithm-
-
getKeyAlgorithm
- Returns:
- keyAlgorithm for the Symmetric Key
-
setSecretKey
Set the symmetric key- Parameters:
secretKey- the SecretKey
-
getSecretKey
- Returns:
- SecretKey the symmetric key
-
newX509CertificateKeyBinding
Create and set the KeyBinding for this WSSPolicy to an X509CertificateBinding- Returns:
- a new X509CertificateBinding as a KeyBinding for this WSSPolicy
- See Also:
-
usesEKSHA1KeyBinding
public boolean usesEKSHA1KeyBinding() -
usesEKSHA1KeyBinding
public void usesEKSHA1KeyBinding(boolean value) -
equals
Description copied from class:WSSPolicyequals operator -
equalsIgnoreTargets
- Specified by:
equalsIgnoreTargetsin classWSSPolicy
-
clone
Clone operator -
getType
Description copied from interface:SecurityPolicyGet the type of the policy.Implementation Note: Useful to avoid instanceof checks and String.equals checks
- Returns:
- the type of the policy
-
toString
-