Top Description Fields Constructors Methods
org.bouncycastle.asn1.x509

public Class X509Name

extends ASN1Object
Class Inheritance
Known Direct Subclasses
org.bouncycastle.jce.X509Principal
Imports
java.io.IOException, java.util.Enumeration, .Hashtable, .Vector, org.bouncycastle.asn1.ASN1Encodable, .ASN1EncodableVector, .ASN1Encoding, .ASN1Object, .ASN1ObjectIdentifier, .ASN1Primitive, .ASN1Sequence, .ASN1Set, .ASN1String, .ASN1TaggedObject, .ASN1UniversalString, .DERSequence, .DERSet, org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers, org.bouncycastle.asn1.x500.X500Name, org.bouncycastle.util.Strings, org.bouncycastle.util.encoders.Hex

Deprecated

use org.bouncycastle.asn1.x500.X500Name.

    RDNSequence ::= SEQUENCE OF RelativeDistinguishedName

    RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue

    AttributeTypeAndValue ::= SEQUENCE {
                                  type  OBJECT IDENTIFIER,
                                  value ANY }

Field Summary

Modifier and TypeField and Description
private Vector<E>
public static final ASN1ObjectIdentifier
BUSINESS_CATEGORY

businessCategory - DirectoryString(SIZE(1..128)

public static final ASN1ObjectIdentifier
C

country code - StringType(SIZE(2))

public static final ASN1ObjectIdentifier
CN

common name - StringType(SIZE(1..64))

private X509NameEntryConverter
public static final ASN1ObjectIdentifier
COUNTRY_OF_CITIZENSHIP

RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166 codes only

public static final ASN1ObjectIdentifier
COUNTRY_OF_RESIDENCE

RFC 3039 CountryOfResidence - PrintableString (SIZE (2)) -- ISO 3166 codes only

public static final ASN1ObjectIdentifier
DATE_OF_BIRTH

RFC 3039 DateOfBirth - GeneralizedTime - YYYYMMDD000000Z

public static final ASN1ObjectIdentifier
public static final Hashtable<K, V>
DefaultLookUp

look up table translating common symbols into their OIDS.

public static boolean
DefaultReverse

determines whether or not strings should be processed and printed from back to front.

public static final Hashtable<K, V>
DefaultSymbols

default look up table translating OID values into their common symbols following the convention in RFC 2253 with a few extras

public static final ASN1ObjectIdentifier
DMD_NAME

RFC 2256 dmdName

public static final ASN1ObjectIdentifier
DN_QUALIFIER

dnQualifier - DirectoryString(SIZE(1..64)

public static final ASN1ObjectIdentifier
E

email address in Verisign certificates

public static final ASN1ObjectIdentifier
EmailAddress

Email address (RSA PKCS#9 extension) - IA5String.

private static final Boolean
public static final ASN1ObjectIdentifier
GENDER

RFC 3039 Gender - PrintableString (SIZE(1)) -- "M", "F", "m" or "f"

public static final ASN1ObjectIdentifier
public static final ASN1ObjectIdentifier
private int
public static final ASN1ObjectIdentifier
private boolean
public static final ASN1ObjectIdentifier
L

locality name - StringType(SIZE(1..64))

public static final ASN1ObjectIdentifier
NAME

id-at-name

public static final ASN1ObjectIdentifier
NAME_AT_BIRTH

ISIS-MTT NameAtBirth - DirectoryString(SIZE(1..64)

public static final ASN1ObjectIdentifier
O

organization - StringType(SIZE(1..64))

public static final Hashtable<K, V>
OIDLookUp

look up table translating OID values into their common symbols

private Vector<E>
public static final ASN1ObjectIdentifier
OU

organizational unit name - StringType(SIZE(1..64))

public static final ASN1ObjectIdentifier
PLACE_OF_BIRTH

RFC 3039 PlaceOfBirth - DirectoryString(SIZE(1..128)

public static final ASN1ObjectIdentifier
POSTAL_ADDRESS

RFC 3039 PostalAddress - SEQUENCE SIZE (1..6) OF DirectoryString(SIZE(1..30))

public static final ASN1ObjectIdentifier
POSTAL_CODE

postalCode - DirectoryString(SIZE(1..40)

public static final ASN1ObjectIdentifier
PSEUDONYM

RFC 3039 Pseudonym - DirectoryString(SIZE(1..64)

public static final Hashtable<K, V>
RFC1779Symbols

look up table translating OID values into their common symbols following the convention in RFC 1779

public static final Hashtable<K, V>
RFC2253Symbols

look up table translating OID values into their common symbols following the convention in RFC 2253

private ASN1Sequence
public static final ASN1ObjectIdentifier
SERIALNUMBER

device serial number name - StringType(SIZE(1..64))

public static final ASN1ObjectIdentifier
SN

device serial number name - StringType(SIZE(1..64))

public static final ASN1ObjectIdentifier
ST

state, or province name - StringType(SIZE(1..64))

public static final ASN1ObjectIdentifier
STREET

street - StringType(SIZE(1..64))

public static final ASN1ObjectIdentifier
SURNAME

Naming attributes of type X520name

public static final Hashtable<K, V>
SymbolLookUp

look up table translating string values into their OIDS -

public static final ASN1ObjectIdentifier
T

Title

public static final ASN1ObjectIdentifier
TELEPHONE_NUMBER

id-at-telephoneNumber

private static final Boolean
public static final ASN1ObjectIdentifier
UID

LDAP User id.

public static final ASN1ObjectIdentifier
public static final ASN1ObjectIdentifier
public static final ASN1ObjectIdentifier
UnstructuredName

more from PKCS#9

private Vector<E>

Constructor Summary

AccessConstructor and Description
protected
public
X509Name(ASN1Sequence seq)

Deprecated use X500Name.getInstance()
Constructor from ASN1Sequence the principal will be a list of constructed sets, each containing an (OID, String) pair.
public
X509Name(Hashtable<K, V> attributes)

Deprecated use an ordered constructor! The hashtable ordering is rarely correct
constructor from a table of attributes.
public
X509Name(Vector<E> ordering, Hashtable<K, V> attributes)

Constructor from a table of attributes with ordering.

public
X509Name(Vector<E> ordering, Hashtable<K, V> attributes, X509NameEntryConverter converter)

Deprecated use X500Name, X500NameBuilder
Constructor from a table of attributes with ordering.
public
X509Name(Vector<E> oids, Vector<E> values)

Deprecated use X500Name, X500NameBuilder
Takes two vectors one of the oids and the other of the values.
public
X509Name(Vector<E> oids, Vector<E> values, X509NameEntryConverter converter)

Deprecated use X500Name, X500NameBuilder
Takes two vectors one of the oids and the other of the values.
public
X509Name(String dirName)

Deprecated use X500Name, X500NameBuilder
Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or some such, converting it into an ordered set of name attributes.
public
X509Name(String dirName, X509NameEntryConverter converter)

Deprecated use X500Name, X500NameBuilder
Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or some such, converting it into an ordered set of name attributes with each string value being converted to its associated ASN.1 type using the passed in converter.
public
X509Name(boolean reverse, String dirName)

Deprecated use X500Name, X500NameBuilder
Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or some such, converting it into an ordered set of name attributes.
public
X509Name(boolean reverse, String dirName, X509NameEntryConverter converter)

Deprecated use X500Name, X500NameBuilder
Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or some such, converting it into an ordered set of name attributes with each string value being converted to its associated ASN.1 type using the passed in converter.
public
X509Name(boolean
true if we should start scanning from the end (RFC 2553).
reverse
,
Hashtable<K, V>
table of names and their oids.
lookUp
,
String
the X.500 string to be parsed.
dirName
)

Deprecated use X500Name, X500NameBuilder
Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or some such, converting it into an ordered set of name attributes.
public
X509Name(boolean
true if we should start scanning from the end, false otherwise.
reverse
,
Hashtable<K, V>
table of names and oids.
lookUp
,
String
the string dirName
dirName
,
X509NameEntryConverter
the converter to convert string values into their ASN.1 equivalents
converter
)

Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or some such, converting it into an ordered set of name attributes.

Method Summary

Modifier and TypeMethod and Description
private void
addEntry(Hashtable<K, V> lookUp, String token, Boolean isAdded)

private void
appendValue(StringBuffer buf, Hashtable<K, V> oidSymbols, ASN1ObjectIdentifier oid, String value)

private String
bytesToString(byte[] data)

private String
private ASN1Primitive
private ASN1ObjectIdentifier
decodeOID(String name, Hashtable<K, V> lookUp)

public boolean
equals(Object obj, boolean
if true the order of both X509 names must be the same, as well as the values associated with each element.
inOrder
)

public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides org.bouncycastle.asn1.ASN1Object.equals.

test for equality - note: case is ignored.
private boolean
public static X509Name

Returns:

the X509Name
getInstance
(ASN1TaggedObject
tag object holding name.
obj
,
boolean
true if explicitly tagged false otherwise.
explicit
)

Deprecated as a consequence of X509Name being deprecated.
Return a X509Name based on the passed in tagged object.
public static X509Name
getInstance(Object obj)

Deprecated as a consequence of X509Name being deprecated.
public Vector<E>
getOIDs()

return a vector of the oids in the name, in the order they were found.

public Vector<E>
getValues()

return a vector of the values found in the name, in the order they were found.

public Vector<E>
getValues(ASN1ObjectIdentifier oid)

return a vector of the values found in the name, in the order they were found, with the DN label corresponding to passed in oid.

public int
hashCode()

Overrides org.bouncycastle.asn1.ASN1Object.hashCode.

Returns a hash code value for the object.
private String
public ASN1Primitive
toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Method providing a primitive representation of this object suitable for encoding.
public String
toString(boolean
if true start at the end of the sequence and work back.
reverse
,
Hashtable<K, V>
look up table strings for oids.
oidSymbols
)

convert the structure to a string - if reverse is true the oids and values are listed out starting with the last element in the sequence (ala RFC 2253), otherwise the string will begin with the first element of the structure.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
private String
Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeTogetEncodedgetEncodedhasEncodedTagValue

Field Detail

addedback to summary
private Vector<E> added
BUSINESS_CATEGORYback to summary
public static final ASN1ObjectIdentifier BUSINESS_CATEGORY

businessCategory - DirectoryString(SIZE(1..128)

Cback to summary
public static final ASN1ObjectIdentifier C

Deprecated

use a X500NameStyle

country code - StringType(SIZE(2))

CNback to summary
public static final ASN1ObjectIdentifier CN

Deprecated

use a X500NameStyle

common name - StringType(SIZE(1..64))

converterback to summary
private X509NameEntryConverter converter
COUNTRY_OF_CITIZENSHIPback to summary
public static final ASN1ObjectIdentifier COUNTRY_OF_CITIZENSHIP

RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166 codes only

COUNTRY_OF_RESIDENCEback to summary
public static final ASN1ObjectIdentifier COUNTRY_OF_RESIDENCE

RFC 3039 CountryOfResidence - PrintableString (SIZE (2)) -- ISO 3166 codes only

DATE_OF_BIRTHback to summary
public static final ASN1ObjectIdentifier DATE_OF_BIRTH

RFC 3039 DateOfBirth - GeneralizedTime - YYYYMMDD000000Z

DCback to summary
public static final ASN1ObjectIdentifier DC
DefaultLookUpback to summary
public static final Hashtable<K, V> DefaultLookUp

look up table translating common symbols into their OIDS.

DefaultReverseback to summary
public static boolean DefaultReverse

determines whether or not strings should be processed and printed from back to front.

DefaultSymbolsback to summary
public static final Hashtable<K, V> DefaultSymbols

default look up table translating OID values into their common symbols following the convention in RFC 2253 with a few extras

DMD_NAMEback to summary
public static final ASN1ObjectIdentifier DMD_NAME

RFC 2256 dmdName

DN_QUALIFIERback to summary
public static final ASN1ObjectIdentifier DN_QUALIFIER

dnQualifier - DirectoryString(SIZE(1..64)

Eback to summary
public static final ASN1ObjectIdentifier E

email address in Verisign certificates

EmailAddressback to summary
public static final ASN1ObjectIdentifier EmailAddress

Deprecated

use a X500NameStyle

Email address (RSA PKCS#9 extension) - IA5String.

Note

if you're trying to be ultra orthodox, don't use this! It shouldn't be in here.

FALSEback to summary
private static final Boolean FALSE
GENDERback to summary
public static final ASN1ObjectIdentifier GENDER

RFC 3039 Gender - PrintableString (SIZE(1)) -- "M", "F", "m" or "f"

GENERATIONback to summary
public static final ASN1ObjectIdentifier GENERATION
GIVENNAMEback to summary
public static final ASN1ObjectIdentifier GIVENNAME
hashCodeValueback to summary
private int hashCodeValue
INITIALSback to summary
public static final ASN1ObjectIdentifier INITIALS
isHashCodeCalculatedback to summary
private boolean isHashCodeCalculated
Lback to summary
public static final ASN1ObjectIdentifier L

locality name - StringType(SIZE(1..64))

NAMEback to summary
public static final ASN1ObjectIdentifier NAME

id-at-name

NAME_AT_BIRTHback to summary
public static final ASN1ObjectIdentifier NAME_AT_BIRTH

ISIS-MTT NameAtBirth - DirectoryString(SIZE(1..64)

Oback to summary
public static final ASN1ObjectIdentifier O

Deprecated

use a X500NameStyle

organization - StringType(SIZE(1..64))

OIDLookUpback to summary
public static final Hashtable<K, V> OIDLookUp

Deprecated

use DefaultSymbols

look up table translating OID values into their common symbols

orderingback to summary
private Vector<E> ordering
OUback to summary
public static final ASN1ObjectIdentifier OU

Deprecated

use a X500NameStyle

organizational unit name - StringType(SIZE(1..64))

PLACE_OF_BIRTHback to summary
public static final ASN1ObjectIdentifier PLACE_OF_BIRTH

RFC 3039 PlaceOfBirth - DirectoryString(SIZE(1..128)

POSTAL_ADDRESSback to summary
public static final ASN1ObjectIdentifier POSTAL_ADDRESS

RFC 3039 PostalAddress - SEQUENCE SIZE (1..6) OF DirectoryString(SIZE(1..30))

POSTAL_CODEback to summary
public static final ASN1ObjectIdentifier POSTAL_CODE

postalCode - DirectoryString(SIZE(1..40)

PSEUDONYMback to summary
public static final ASN1ObjectIdentifier PSEUDONYM

RFC 3039 Pseudonym - DirectoryString(SIZE(1..64)

RFC1779Symbolsback to summary
public static final Hashtable<K, V> RFC1779Symbols

look up table translating OID values into their common symbols following the convention in RFC 1779

RFC2253Symbolsback to summary
public static final Hashtable<K, V> RFC2253Symbols

look up table translating OID values into their common symbols following the convention in RFC 2253

seqback to summary
private ASN1Sequence seq
SERIALNUMBERback to summary
public static final ASN1ObjectIdentifier SERIALNUMBER

device serial number name - StringType(SIZE(1..64))

SNback to summary
public static final ASN1ObjectIdentifier SN

device serial number name - StringType(SIZE(1..64))

STback to summary
public static final ASN1ObjectIdentifier ST

state, or province name - StringType(SIZE(1..64))

STREETback to summary
public static final ASN1ObjectIdentifier STREET

street - StringType(SIZE(1..64))

SURNAMEback to summary
public static final ASN1ObjectIdentifier SURNAME

Naming attributes of type X520name

SymbolLookUpback to summary
public static final Hashtable<K, V> SymbolLookUp

Deprecated

use DefaultLookUp

look up table translating string values into their OIDS -

Tback to summary
public static final ASN1ObjectIdentifier T

Deprecated

use a X500NameStyle

Title

TELEPHONE_NUMBERback to summary
public static final ASN1ObjectIdentifier TELEPHONE_NUMBER

id-at-telephoneNumber

TRUEback to summary
private static final Boolean TRUE
UIDback to summary
public static final ASN1ObjectIdentifier UID

LDAP User id.

UNIQUE_IDENTIFIERback to summary
public static final ASN1ObjectIdentifier UNIQUE_IDENTIFIER
UnstructuredAddressback to summary
public static final ASN1ObjectIdentifier UnstructuredAddress
UnstructuredNameback to summary
public static final ASN1ObjectIdentifier UnstructuredName

more from PKCS#9

valuesback to summary
private Vector<E> values

Constructor Detail

X509Nameback to summary
protected X509Name()
X509Nameback to summary
public X509Name(ASN1Sequence seq)

Deprecated

use X500Name.getInstance()

Constructor from ASN1Sequence the principal will be a list of constructed sets, each containing an (OID, String) pair.

X509Nameback to summary
public X509Name(Hashtable<K, V> attributes)

Deprecated

use an ordered constructor! The hashtable ordering is rarely correct

constructor from a table of attributes.

it's is assumed the table contains OID/String pairs, and the contents of the table are copied into an internal table as part of the construction process.

Note

if the name you are trying to generate should be following a specific ordering, you should use the constructor with the ordering specified below.

X509Nameback to summary
public X509Name(Vector<E> ordering, Hashtable<K, V> attributes)

Constructor from a table of attributes with ordering.

it's is assumed the table contains OID/String pairs, and the contents of the table are copied into an internal table as part of the construction process. The ordering vector should contain the OIDs in the order they are meant to be encoded or printed in toString.

X509Nameback to summary
public X509Name(Vector<E> ordering, Hashtable<K, V> attributes, X509NameEntryConverter converter)

Deprecated

use X500Name, X500NameBuilder

Constructor from a table of attributes with ordering.

it's is assumed the table contains OID/String pairs, and the contents of the table are copied into an internal table as part of the construction process. The ordering vector should contain the OIDs in the order they are meant to be encoded or printed in toString.

The passed in converter will be used to convert the strings into their ASN.1 counterparts.

X509Nameback to summary
public X509Name(Vector<E> oids, Vector<E> values)

Deprecated

use X500Name, X500NameBuilder

Takes two vectors one of the oids and the other of the values.

X509Nameback to summary
public X509Name(Vector<E> oids, Vector<E> values, X509NameEntryConverter converter)

Deprecated

use X500Name, X500NameBuilder

Takes two vectors one of the oids and the other of the values.

The passed in converter will be used to convert the strings into their ASN.1 counterparts.

X509Nameback to summary
public X509Name(String dirName)

Deprecated

use X500Name, X500NameBuilder

Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or some such, converting it into an ordered set of name attributes.

X509Nameback to summary
public X509Name(String dirName, X509NameEntryConverter converter)

Deprecated

use X500Name, X500NameBuilder

Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or some such, converting it into an ordered set of name attributes with each string value being converted to its associated ASN.1 type using the passed in converter.

X509Nameback to summary
public X509Name(boolean reverse, String dirName)

Deprecated

use X500Name, X500NameBuilder

Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or some such, converting it into an ordered set of name attributes. If reverse is true, create the encoded version of the sequence starting from the last element in the string.

X509Nameback to summary
public X509Name(boolean reverse, String dirName, X509NameEntryConverter converter)

Deprecated

use X500Name, X500NameBuilder

Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or some such, converting it into an ordered set of name attributes with each string value being converted to its associated ASN.1 type using the passed in converter. If reverse is true the ASN.1 sequence representing the DN will be built by starting at the end of the string, rather than the start.

X509Nameback to summary
public X509Name(boolean reverse, Hashtable<K, V> lookUp, String dirName)

Deprecated

use X500Name, X500NameBuilder

Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or some such, converting it into an ordered set of name attributes. lookUp should provide a table of lookups, indexed by lowercase only strings and yielding a ASN1ObjectIdentifier, other than that OID. and numeric oids will be processed automatically.
If reverse is true, create the encoded version of the sequence starting from the last element in the string.

Parameters
reverse:boolean

true if we should start scanning from the end (RFC 2553).

lookUp:Hashtable<K, V>

table of names and their oids.

dirName:String

the X.500 string to be parsed.

X509Nameback to summary
public X509Name(boolean reverse, Hashtable<K, V> lookUp, String dirName, X509NameEntryConverter converter)

Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or some such, converting it into an ordered set of name attributes. lookUp should provide a table of lookups, indexed by lowercase only strings and yielding a ASN1ObjectIdentifier, other than that OID. and numeric oids will be processed automatically. The passed in converter is used to convert the string values to the right of each equals sign to their ASN.1 counterparts.

Parameters
reverse:boolean

true if we should start scanning from the end, false otherwise.

lookUp:Hashtable<K, V>

table of names and oids.

dirName:String

the string dirName

converter:X509NameEntryConverter

the converter to convert string values into their ASN.1 equivalents

Method Detail

addEntryback to summary
private void addEntry(Hashtable<K, V> lookUp, String token, Boolean isAdded)
appendValueback to summary
private void appendValue(StringBuffer buf, Hashtable<K, V> oidSymbols, ASN1ObjectIdentifier oid, String value)
bytesToStringback to summary
private String bytesToString(byte[] data)
canonicalizeback to summary
private String canonicalize(String s)
decodeObjectback to summary
private ASN1Primitive decodeObject(String oValue)
decodeOIDback to summary
private ASN1ObjectIdentifier decodeOID(String name, Hashtable<K, V> lookUp)
equalsback to summary
public boolean equals(Object obj, boolean inOrder)
Parameters
inOrder:boolean

if true the order of both X509 names must be the same, as well as the values associated with each element.

equalsback to summary
public boolean equals(Object obj)

Overrides org.bouncycastle.asn1.ASN1Object.equals.

test for equality - note: case is ignored.

Parameters
obj:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

equivalentStringsback to summary
private boolean equivalentStrings(String s1, String s2)
getInstanceback to summary
public static X509Name getInstance(ASN1TaggedObject obj, boolean explicit)

Deprecated

as a consequence of X509Name being deprecated. See corresponding docs for further information.

Return a X509Name based on the passed in tagged object.

Parameters
obj:ASN1TaggedObject

tag object holding name.

explicit:boolean

true if explicitly tagged false otherwise.

Returns:X509Name

the X509Name

getInstanceback to summary
public static X509Name getInstance(Object obj)

Deprecated

as a consequence of X509Name being deprecated. See corresponding docs for further information.

getOIDsback to summary
public Vector<E> getOIDs()

return a vector of the oids in the name, in the order they were found.

getValuesback to summary
public Vector<E> getValues()

return a vector of the values found in the name, in the order they were found.

getValuesback to summary
public Vector<E> getValues(ASN1ObjectIdentifier oid)

return a vector of the values found in the name, in the order they were found, with the DN label corresponding to passed in oid.

hashCodeback to summary
public int hashCode()

Overrides org.bouncycastle.asn1.ASN1Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

stripInternalSpacesback to summary
private String stripInternalSpaces(String str)
toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Doc from org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Method providing a primitive representation of this object suitable for encoding.

Returns:ASN1Primitive

a primitive representation of this object.

toStringback to summary
public String toString(boolean reverse, Hashtable<K, V> oidSymbols)

convert the structure to a string - if reverse is true the oids and values are listed out starting with the last element in the sequence (ala RFC 2253), otherwise the string will begin with the first element of the structure. If no string definition for the oid is found in oidSymbols the string value of the oid is added. Two standard symbol tables are provided DefaultSymbols, and RFC2253Symbols as part of this class.

Parameters
reverse:boolean

if true start at the end of the sequence and work back.

oidSymbols:Hashtable<K, V>

look up table strings for oids.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

unescapeback to summary
private String unescape(String elt)