Class X500Name
-
- All Implemented Interfaces:
-
io.anyline.nfc.bouncycastle.asn1.ASN1Choice
,io.anyline.nfc.bouncycastle.asn1.ASN1Encodable
,io.anyline.nfc.bouncycastle.util.Encodable
public class X500Name extends ASN1Object implements ASN1Choice
The X.500 Name object.
Name ::= CHOICE { RDNSequence } RDNSequence ::= SEQUENCE OF RelativeDistinguishedName RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue AttributeTypeAndValue ::= SEQUENCE { type OBJECT IDENTIFIER, value ANY }
-
-
Field Summary
Fields Modifier and Type Field Description public static X500NameStyle
defaultStyle
-
Constructor Summary
Constructors Constructor Description X500Name(X500NameStyle style, X500Name name)
X500Name(Array<RDN> rDNs)
X500Name(X500NameStyle style, Array<RDN> rDNs)
X500Name(String dirName)
X500Name(X500NameStyle style, String dirName)
-
Method Summary
Modifier and Type Method Description static X500NameStyle
getDefaultStyle()
Return the current default style. static void
setDefaultStyle(X500NameStyle style)
Set the default style for X500Name construction. static X500Name
getInstance(ASN1TaggedObject obj, boolean explicit)
Return a X500Name based on the passed in tagged object. static X500Name
getInstance(Object obj)
static X500Name
getInstance(X500NameStyle style, Object obj)
Array<RDN>
getRDNs()
return an array of RDNs in structure order. Array<ASN1ObjectIdentifier>
getAttributeTypes()
return an array of OIDs contained in the attribute type of each RDN in structure order. Array<RDN>
getRDNs(ASN1ObjectIdentifier attributeType)
return an array of RDNs containing the attribute type given by OID in structure order. ASN1Primitive
toASN1Primitive()
Method providing a primitive representation of this object suitable for encoding. int
hashCode()
boolean
equals(Object obj)
test for equality - note: case is ignored. String
toString()
-
-
Constructor Detail
-
X500Name
X500Name(X500NameStyle style, X500Name name)
-
X500Name
X500Name(X500NameStyle style, Array<RDN> rDNs)
-
X500Name
X500Name(String dirName)
-
X500Name
X500Name(X500NameStyle style, String dirName)
-
-
Method Detail
-
getDefaultStyle
static X500NameStyle getDefaultStyle()
Return the current default style.
- Returns:
default style for X500Name construction.
-
setDefaultStyle
static void setDefaultStyle(X500NameStyle style)
Set the default style for X500Name construction.
- Parameters:
style
- an X500NameStyle
-
getInstance
static X500Name getInstance(ASN1TaggedObject obj, boolean explicit)
Return a X500Name based on the passed in tagged object.
- Parameters:
obj
- tag object holding name.explicit
- true if explicitly tagged false otherwise.- Returns:
the X500Name
-
getInstance
static X500Name getInstance(Object obj)
-
getInstance
static X500Name getInstance(X500NameStyle style, Object obj)
-
getRDNs
Array<RDN> getRDNs()
return an array of RDNs in structure order.
- Returns:
an array of RDN objects.
-
getAttributeTypes
Array<ASN1ObjectIdentifier> getAttributeTypes()
return an array of OIDs contained in the attribute type of each RDN in structure order.
- Returns:
an array, possibly zero length, of ASN1ObjectIdentifiers objects.
-
getRDNs
Array<RDN> getRDNs(ASN1ObjectIdentifier attributeType)
return an array of RDNs containing the attribute type given by OID in structure order.
- Parameters:
attributeType
- the type OID we are looking for.- Returns:
an array, possibly zero length, of RDN objects.
-
toASN1Primitive
ASN1Primitive toASN1Primitive()
Method providing a primitive representation of this object suitable for encoding.
- Returns:
a primitive representation of this object.
-
hashCode
int hashCode()
-
-
-
-