Class AbstractX500NameStyle

  • All Implemented Interfaces:
    X500NameStyle
    Direct Known Subclasses:
    BCStyle, RFC4519Style

    public abstract class AbstractX500NameStyle
    extends java.lang.Object
    implements X500NameStyle
    This class provides some default behavior and common implementation for a X500NameStyle. It should be easily extendable to support implementing the desired X500NameStyle.
    • Constructor Detail

      • AbstractX500NameStyle

        public AbstractX500NameStyle()
    • Method Detail

      • copyHashTable

        public static java.util.Hashtable copyHashTable​(java.util.Hashtable paramsMap)
        Tool function to shallow copy a Hashtable.
        Parameters:
        paramsMap - table to copy
        Returns:
        the copy of the table
      • calculateHashCode

        public int calculateHashCode​(X500Name name)
        Description copied from interface: X500NameStyle
        Calculate a hashCode for the passed in name.
        Specified by:
        calculateHashCode in interface X500NameStyle
        Parameters:
        name - the name the hashCode is required for.
        Returns:
        the calculated hashCode.
      • encodeStringValue

        protected ASN1Encodable encodeStringValue​(ASN1ObjectIdentifier oid,
                                                  java.lang.String value)
        Encoded every value into a UTF8String.

        Subclasses should overwrite this method to change the encoding of specific types.

        Parameters:
        oid - the DN oid of the value
        value - the String representation of the value
        Returns:
        a the value encoded into a ASN.1 object. Never returns null.
      • areEqual

        public boolean areEqual​(X500Name name1,
                                X500Name name2)
        Description copied from interface: X500NameStyle
        Return true if the two names are equal.
        Specified by:
        areEqual in interface X500NameStyle
        Parameters:
        name1 - first name for comparison.
        name2 - second name for comparison.
        Returns:
        true if name1 = name 2, false otherwise.
      • rdnAreEqual

        protected boolean rdnAreEqual​(RDN rdn1,
                                      RDN rdn2)