Class AbstractX500NameStyle
-
- All Implemented Interfaces:
-
io.anyline.nfc.bouncycastle.asn1.x500.X500NameStyle
public abstract class AbstractX500NameStyle 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 Summary
Constructors Constructor Description AbstractX500NameStyle()
-
Method Summary
Modifier and Type Method Description static Hashtable
copyHashTable(Hashtable paramsMap)
Tool function to shallow copy a Hashtable. int
calculateHashCode(X500Name name)
Calculate a hashCode for the passed in name. ASN1Encodable
stringToValue(ASN1ObjectIdentifier oid, String value)
For all string values starting with '#' is assumed, that these are already valid ASN.1 objects encoded in hex. boolean
areEqual(X500Name name1, X500Name name2)
Return true if the two names are equal. -
-
Method Detail
-
copyHashTable
static Hashtable copyHashTable(Hashtable paramsMap)
Tool function to shallow copy a Hashtable.
- Parameters:
paramsMap
- table to copy- Returns:
the copy of the table
-
calculateHashCode
int calculateHashCode(X500Name name)
Calculate a hashCode for the passed in name.
- Parameters:
name
- the name the hashCode is required for.- Returns:
the calculated hashCode.
-
stringToValue
ASN1Encodable stringToValue(ASN1ObjectIdentifier oid, String value)
For all string values starting with '#' is assumed, that these are already valid ASN.1 objects encoded in hex.
All other string values are send to encodeStringValue.
Subclasses should overwrite encodeStringValue to change the encoding of specific types.- Parameters:
oid
- the DN name of the value.value
- the String representation of the value.
-
-
-
-