public abstract class AbstractX500NameStyle extends java.lang.Object implements X500NameStyle
| Constructor and Description |
|---|
AbstractX500NameStyle() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
areEqual(X500Name name1,
X500Name name2)
Two names are equal when they carry the same multiset of RDNs, each RDN compared by
rdnAreEqual(RDN, RDN). |
int |
calculateHashCode(X500Name name)
Calculate a hashCode for the passed in name.
|
static java.util.Hashtable |
copyHashTable(java.util.Hashtable paramsMap)
Tool function to shallow copy a Hashtable.
|
protected ASN1Encodable |
encodeStringValue(ASN1ObjectIdentifier oid,
java.lang.String value)
Encoded every value into a UTF8String.
|
protected boolean |
rdnAreEqual(RDN rdn1,
RDN rdn2) |
ASN1Encodable |
stringToValue(ASN1ObjectIdentifier oid,
java.lang.String value)
For all string values starting with '#' is assumed, that these are
already valid ASN.1 objects encoded in hex.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitattrNameToOID, fromString, oidToAttrNames, oidToDisplayName, toStringpublic static java.util.Hashtable copyHashTable(java.util.Hashtable paramsMap)
paramsMap - table to copypublic int calculateHashCode(X500Name name)
X500NameStylecalculateHashCode in interface X500NameStylename - the name the hashCode is required for.public ASN1Encodable stringToValue(ASN1ObjectIdentifier oid, java.lang.String value)
All other string values are send to
encodeStringValue(ASN1ObjectIdentifier, String).
encodeStringValue(ASN1ObjectIdentifier, String)
to change the encoding of specific types.stringToValue in interface X500NameStyleoid - the DN name of the value.value - the String representation of the value.protected ASN1Encodable encodeStringValue(ASN1ObjectIdentifier oid, java.lang.String value)
Subclasses should overwrite this method to change the encoding of specific types.
oid - the DN oid of the valuevalue - the String representation of the valuenull.public boolean areEqual(X500Name name1, X500Name name2)
rdnAreEqual(RDN, RDN). The RDNs are first compared position by position, in the
order they appear or, when the first attribute types differ, in reverse (the usual two
encodings of one name); only when that fails are the two multisets compared, by sorting
the canonical form of every RDN once, so a name reached from untrusted data costs
n log n in its number of RDNs rather than the n squared of a pairwise search. A subclass
that overrides rdnAreEqual is consulted on the positional pass; the multiset pass compares
the canonical forms of IETFUtils.canonicalString(ASN1Encodable).areEqual in interface X500NameStylename1 - first name for comparison.name2 - second name for comparison.