|
Bouncy Castle Cryptography Library 1.87 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bouncycastle.asn1.x500.style.AbstractX500NameStyle
This class provides some default behavior and common implementation for a X500NameStyle. It should be easily extendable to support implementing the desired X500NameStyle.
| Constructor Summary | |
AbstractX500NameStyle()
|
|
| Method Summary | |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.bouncycastle.asn1.x500.X500NameStyle |
attrNameToOID, fromString, oidToAttrNames, oidToDisplayName, toString |
| Constructor Detail |
public AbstractX500NameStyle()
| Method Detail |
public static java.util.Hashtable copyHashTable(java.util.Hashtable paramsMap)
paramsMap - table to copy
public int calculateHashCode(X500Name name)
X500NameStyle
calculateHashCode 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 value
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.
protected boolean rdnAreEqual(RDN rdn1,
RDN rdn2)
|
Bouncy Castle Cryptography Library 1.87 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||