Bouncy Castle Cryptography 1.46

org.bouncycastle.asn1.x500.style
Class BCStyle

java.lang.Object
  extended by org.bouncycastle.asn1.x500.style.BCStyle
All Implemented Interfaces:
X500NameStyle
Direct Known Subclasses:
BCStrictStyle

public class BCStyle
extends java.lang.Object
implements X500NameStyle


Field Summary
static ASN1ObjectIdentifier BUSINESS_CATEGORY
          businessCategory - DirectoryString(SIZE(1..128)
static ASN1ObjectIdentifier C
          country code - StringType(SIZE(2))
static ASN1ObjectIdentifier CN
          common name - StringType(SIZE(1..64))
static ASN1ObjectIdentifier COUNTRY_OF_CITIZENSHIP
          RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166 codes only
static ASN1ObjectIdentifier COUNTRY_OF_RESIDENCE
          RFC 3039 CountryOfResidence - PrintableString (SIZE (2)) -- ISO 3166 codes only
static ASN1ObjectIdentifier DATE_OF_BIRTH
          RFC 3039 DateOfBirth - GeneralizedTime - YYYYMMDD000000Z
static ASN1ObjectIdentifier DC
           
static ASN1ObjectIdentifier DMD_NAME
          RFC 2256 dmdName
static ASN1ObjectIdentifier DN_QUALIFIER
          dnQualifier - DirectoryString(SIZE(1..64)
static ASN1ObjectIdentifier E
          email address in Verisign certificates
static ASN1ObjectIdentifier EmailAddress
          Email address (RSA PKCS#9 extension) - IA5String.
static ASN1ObjectIdentifier GENDER
          RFC 3039 Gender - PrintableString (SIZE(1)) -- "M", "F", "m" or "f"
static ASN1ObjectIdentifier GENERATION
           
static ASN1ObjectIdentifier GIVENNAME
           
static ASN1ObjectIdentifier INITIALS
           
static X500NameStyle INSTANCE
           
static ASN1ObjectIdentifier L
          locality name - StringType(SIZE(1..64))
static ASN1ObjectIdentifier NAME
          id-at-name
static ASN1ObjectIdentifier NAME_AT_BIRTH
          ISIS-MTT NameAtBirth - DirectoryString(SIZE(1..64)
static ASN1ObjectIdentifier O
          organization - StringType(SIZE(1..64))
static ASN1ObjectIdentifier OU
          organizational unit name - StringType(SIZE(1..64))
static ASN1ObjectIdentifier PLACE_OF_BIRTH
          RFC 3039 PlaceOfBirth - DirectoryString(SIZE(1..128)
static ASN1ObjectIdentifier POSTAL_ADDRESS
          RFC 3039 PostalAddress - SEQUENCE SIZE (1..6) OF DirectoryString(SIZE(1..30))
static ASN1ObjectIdentifier POSTAL_CODE
          postalCode - DirectoryString(SIZE(1..40)
static ASN1ObjectIdentifier PSEUDONYM
          RFC 3039 Pseudonym - DirectoryString(SIZE(1..64)
static ASN1ObjectIdentifier SERIALNUMBER
          device serial number name - StringType(SIZE(1..64))
static ASN1ObjectIdentifier SN
          device serial number name - StringType(SIZE(1..64))
static ASN1ObjectIdentifier ST
          state, or province name - StringType(SIZE(1..64))
static ASN1ObjectIdentifier STREET
          street - StringType(SIZE(1..64))
static ASN1ObjectIdentifier SURNAME
          Naming attributes of type X520name
static ASN1ObjectIdentifier T
          Title
static ASN1ObjectIdentifier TELEPHONE_NUMBER
          id-at-telephoneNumber
static ASN1ObjectIdentifier UID
          LDAP User id.
static ASN1ObjectIdentifier UNIQUE_IDENTIFIER
           
static ASN1ObjectIdentifier UnstructuredAddress
           
static ASN1ObjectIdentifier UnstructuredName
          more from PKCS#9
 
Constructor Summary
protected BCStyle()
           
 
Method Summary
 boolean areEqual(X500Name name1, X500Name name2)
           
 ASN1ObjectIdentifier attrNameToOID(java.lang.String attrName)
           
 int calculateHashCode(X500Name name)
           
 RDN[] fromString(java.lang.String dirName)
           
protected  boolean rdnAreEqual(RDN rdn1, RDN rdn2)
           
 ASN1Encodable stringToValue(ASN1ObjectIdentifier oid, java.lang.String value)
          Convert the passed in String value into the appropriate ASN.1 encoded object.
 java.lang.String toString(X500Name name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final X500NameStyle INSTANCE

C

public static final ASN1ObjectIdentifier C
country code - StringType(SIZE(2))


O

public static final ASN1ObjectIdentifier O
organization - StringType(SIZE(1..64))


OU

public static final ASN1ObjectIdentifier OU
organizational unit name - StringType(SIZE(1..64))


T

public static final ASN1ObjectIdentifier T
Title


CN

public static final ASN1ObjectIdentifier CN
common name - StringType(SIZE(1..64))


SN

public static final ASN1ObjectIdentifier SN
device serial number name - StringType(SIZE(1..64))


STREET

public static final ASN1ObjectIdentifier STREET
street - StringType(SIZE(1..64))


SERIALNUMBER

public static final ASN1ObjectIdentifier SERIALNUMBER
device serial number name - StringType(SIZE(1..64))


L

public static final ASN1ObjectIdentifier L
locality name - StringType(SIZE(1..64))


ST

public static final ASN1ObjectIdentifier ST
state, or province name - StringType(SIZE(1..64))


SURNAME

public static final ASN1ObjectIdentifier SURNAME
Naming attributes of type X520name


GIVENNAME

public static final ASN1ObjectIdentifier GIVENNAME

INITIALS

public static final ASN1ObjectIdentifier INITIALS

GENERATION

public static final ASN1ObjectIdentifier GENERATION

UNIQUE_IDENTIFIER

public static final ASN1ObjectIdentifier UNIQUE_IDENTIFIER

BUSINESS_CATEGORY

public static final ASN1ObjectIdentifier BUSINESS_CATEGORY
businessCategory - DirectoryString(SIZE(1..128)


POSTAL_CODE

public static final ASN1ObjectIdentifier POSTAL_CODE
postalCode - DirectoryString(SIZE(1..40)


DN_QUALIFIER

public static final ASN1ObjectIdentifier DN_QUALIFIER
dnQualifier - DirectoryString(SIZE(1..64)


PSEUDONYM

public static final ASN1ObjectIdentifier PSEUDONYM
RFC 3039 Pseudonym - DirectoryString(SIZE(1..64)


DATE_OF_BIRTH

public static final ASN1ObjectIdentifier DATE_OF_BIRTH
RFC 3039 DateOfBirth - GeneralizedTime - YYYYMMDD000000Z


PLACE_OF_BIRTH

public static final ASN1ObjectIdentifier PLACE_OF_BIRTH
RFC 3039 PlaceOfBirth - DirectoryString(SIZE(1..128)


GENDER

public static final ASN1ObjectIdentifier GENDER
RFC 3039 Gender - PrintableString (SIZE(1)) -- "M", "F", "m" or "f"


COUNTRY_OF_CITIZENSHIP

public static final ASN1ObjectIdentifier COUNTRY_OF_CITIZENSHIP
RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166 codes only


COUNTRY_OF_RESIDENCE

public static final ASN1ObjectIdentifier COUNTRY_OF_RESIDENCE
RFC 3039 CountryOfResidence - PrintableString (SIZE (2)) -- ISO 3166 codes only


NAME_AT_BIRTH

public static final ASN1ObjectIdentifier NAME_AT_BIRTH
ISIS-MTT NameAtBirth - DirectoryString(SIZE(1..64)


POSTAL_ADDRESS

public static final ASN1ObjectIdentifier POSTAL_ADDRESS
RFC 3039 PostalAddress - SEQUENCE SIZE (1..6) OF DirectoryString(SIZE(1..30))


DMD_NAME

public static final ASN1ObjectIdentifier DMD_NAME
RFC 2256 dmdName


TELEPHONE_NUMBER

public static final ASN1ObjectIdentifier TELEPHONE_NUMBER
id-at-telephoneNumber


NAME

public static final ASN1ObjectIdentifier NAME
id-at-name


EmailAddress

public static final ASN1ObjectIdentifier EmailAddress
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.


UnstructuredName

public static final ASN1ObjectIdentifier UnstructuredName
more from PKCS#9


UnstructuredAddress

public static final ASN1ObjectIdentifier UnstructuredAddress

E

public static final ASN1ObjectIdentifier E
email address in Verisign certificates


DC

public static final ASN1ObjectIdentifier DC

UID

public static final ASN1ObjectIdentifier UID
LDAP User id.

Constructor Detail

BCStyle

protected BCStyle()
Method Detail

stringToValue

public ASN1Encodable stringToValue(ASN1ObjectIdentifier oid,
                                   java.lang.String value)
Description copied from interface: X500NameStyle
Convert the passed in String value into the appropriate ASN.1 encoded object.

Specified by:
stringToValue in interface X500NameStyle
Parameters:
oid - the oid associated with the value in the DN.
value - the value of the particular DN component.
Returns:
the ASN.1 equivalent for the value.

attrNameToOID

public ASN1ObjectIdentifier attrNameToOID(java.lang.String attrName)
Specified by:
attrNameToOID in interface X500NameStyle

areEqual

public boolean areEqual(X500Name name1,
                        X500Name name2)
Specified by:
areEqual in interface X500NameStyle

rdnAreEqual

protected boolean rdnAreEqual(RDN rdn1,
                              RDN rdn2)

fromString

public RDN[] fromString(java.lang.String dirName)
Specified by:
fromString in interface X500NameStyle

calculateHashCode

public int calculateHashCode(X500Name name)
Specified by:
calculateHashCode in interface X500NameStyle

toString

public java.lang.String toString(X500Name name)
Specified by:
toString in interface X500NameStyle

Bouncy Castle Cryptography 1.46