Class SSLHostConfigPreSharedKey

  • All Implemented Interfaces:
    java.io.Serializable

    public class SSLHostConfigPreSharedKey
    extends java.lang.Object
    implements java.io.Serializable
    Represents a pre-shared key configuration for a virtual host.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDigest()
      Returns the message digest algorithm name.
      MessageDigest getDigestInternal()
      Returns the message digest.
      java.lang.String getIdentity()
      Returns the identity associated with the pre-shared key.
      java.lang.String getKey()
      Returns the pre-shared key as a hexadecimal string.
      byte[] getKeyInternal()
      Returns the pre-shared key.
      SSLHostConfig getSSLHostConfig()
      Returns the SSLHostConfig that owns this pre-shared key configuration.
      void setDigest​(java.lang.String digest)
      Sets the message digest algorithm.
      void setIdentity​(java.lang.String identity)
      Sets the identity associated with the pre-shared key.
      void setKey​(java.lang.String key)
      Sets the pre-shared key from a hexadecimal string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SSLHostConfigPreSharedKey

        public SSLHostConfigPreSharedKey()
        Creates a new pre-shared key configuration with default settings.
      • SSLHostConfigPreSharedKey

        public SSLHostConfigPreSharedKey​(SSLHostConfig sslHostConfig)
        Creates a new pre-shared key configuration for the given host.
        Parameters:
        sslHostConfig - the parent SSL host configuration
    • Method Detail

      • getSSLHostConfig

        public SSLHostConfig getSSLHostConfig()
        Returns the SSLHostConfig that owns this pre-shared key configuration.
        Returns:
        the parent SSLHostConfig
      • getIdentity

        public java.lang.String getIdentity()
        Returns the identity associated with the pre-shared key.
        Returns:
        the pre-shared key identity
      • setIdentity

        public void setIdentity​(java.lang.String identity)
        Sets the identity associated with the pre-shared key.
        Parameters:
        identity - the pre-shared key identity
      • getKey

        public java.lang.String getKey()
        Returns the pre-shared key as a hexadecimal string.
        Returns:
        the hexadecimal pre-shared key
      • setKey

        public void setKey​(java.lang.String key)
        Sets the pre-shared key from a hexadecimal string.
        Parameters:
        key - the hexadecimal pre-shared key
        Throws:
        java.lang.IllegalArgumentException - if the key is not valid hexadecimal
      • getKeyInternal

        public byte[] getKeyInternal()
        Returns the pre-shared key.
        Returns:
        the pre-shared key
      • getDigest

        public java.lang.String getDigest()
        Returns the message digest algorithm name.
        Returns:
        the message digest algorithm name
      • setDigest

        public void setDigest​(java.lang.String digest)
        Sets the message digest algorithm.
        Parameters:
        digest - the message digest name
        Throws:
        java.lang.IllegalArgumentException - if the message digest is not recognized
      • getDigestInternal

        public MessageDigest getDigestInternal()
        Returns the message digest.
        Returns:
        the message digest