Class SymmetricKeyBinding

  • All Implemented Interfaces:
    SecurityPolicy, Cloneable

    public class SymmetricKeyBinding
    extends KeyBindingBase
    A policy representing a SymmetricKey that can be used as the KeyBinding for a SignaturePolicy or an EncryptionPolicy.
    • Constructor Detail

      • SymmetricKeyBinding

        public SymmetricKeyBinding()
        Default constructor
      • SymmetricKeyBinding

        public SymmetricKeyBinding​(String keyIdentifier,
                                   String keyAlgorithm)
        Parameters:
        keyIdentifier - identifier for Key
        keyAlgorithm - Key Algorithm
    • Method Detail

      • setKeyIdentifier

        public void setKeyIdentifier​(String keyIdentifier)
        set the key identifier for the symmetric key
        Parameters:
        keyIdentifier -
      • getKeyIdentifier

        public String getKeyIdentifier()
        Returns:
        key identifier for the symmetric key
      • setCertAlias

        public void setCertAlias​(String certAlias)
      • getCertAlias

        public String getCertAlias()
      • setUseReceivedSecret

        public void setUseReceivedSecret​(boolean useReceivedSecret)
      • getUseReceivedSecret

        public boolean getUseReceivedSecret()
      • setKeyAlgorithm

        public void setKeyAlgorithm​(String keyAlgorithm)
        set the Key Algorithm of the Symmetric Key
        Parameters:
        keyAlgorithm -
      • getKeyAlgorithm

        public String getKeyAlgorithm()
        Returns:
        keyAlgorithm for the Symmetric Key
      • setSecretKey

        public void setSecretKey​(SecretKey secretKey)
        Set the symmetric key
        Parameters:
        secretKey - the SecretKey
      • getSecretKey

        public SecretKey getSecretKey()
        Returns:
        SecretKey the symmetric key
      • usesEKSHA1KeyBinding

        public boolean usesEKSHA1KeyBinding()
      • usesEKSHA1KeyBinding

        public void usesEKSHA1KeyBinding​(boolean value)
      • getType

        public String getType()
        Description copied from interface: SecurityPolicy
        Get the type of the policy.

        Implementation Note: Useful to avoid instanceof checks and String.equals checks

        Returns:
        the type of the policy