Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/bouncycastle/asn1/x500/X500NameStyle.java')
-rw-r--r--src/main/java/org/bouncycastle/asn1/x500/X500NameStyle.java51
1 files changed, 48 insertions, 3 deletions
diff --git a/src/main/java/org/bouncycastle/asn1/x500/X500NameStyle.java b/src/main/java/org/bouncycastle/asn1/x500/X500NameStyle.java
index 7a7c8370..704ea72e 100644
--- a/src/main/java/org/bouncycastle/asn1/x500/X500NameStyle.java
+++ b/src/main/java/org/bouncycastle/asn1/x500/X500NameStyle.java
@@ -16,19 +16,64 @@ public interface X500NameStyle
* Convert the passed in String value into the appropriate ASN.1
* encoded object.
*
- * @param oid the oid associated with the value in the DN.
+ * @param oid the OID associated with the value in the DN.
* @param value the value of the particular DN component.
* @return the ASN.1 equivalent for the value.
*/
ASN1Encodable stringToValue(ASN1ObjectIdentifier oid, String value);
+ /**
+ * Return the OID associated with the passed in name.
+ *
+ * @param attrName the string to match.
+ * @return an OID
+ */
ASN1ObjectIdentifier attrNameToOID(String attrName);
- boolean areEqual(X500Name name1, X500Name name2);
-
+ /**
+ * Return an array of RDN generated from the passed in String.
+ * @param dirName the String representation.
+ * @return an array of corresponding RDNs.
+ */
RDN[] fromString(String dirName);
+ /**
+ * Return true if the two names are equal.
+ *
+ * @param name1 first name for comparison.
+ * @param name2 second name for comparison.
+ * @return true if name1 = name 2, false otherwise.
+ */
+ boolean areEqual(X500Name name1, X500Name name2);
+
+ /**
+ * Calculate a hashCode for the passed in name.
+ *
+ * @param name the name the hashCode is required for.
+ * @return the calculated hashCode.
+ */
int calculateHashCode(X500Name name);
+ /**
+ * Convert the passed in X500Name to a String.
+ * @param name the name to convert.
+ * @return a String representation.
+ */
String toString(X500Name name);
+
+ /**
+ * Return the display name for toString() associated with the OID.
+ *
+ * @param oid the OID of interest.
+ * @return the name displayed in toString(), null if no mapping provided.
+ */
+ String oidToDisplayName(ASN1ObjectIdentifier oid);
+
+ /**
+ * Return the acceptable names in a String DN that map to OID.
+ *
+ * @param oid the OID of interest.
+ * @return an array of String aliases for the OID, zero length if there are none.
+ */
+ String[] oidToAttrNames(ASN1ObjectIdentifier oid);
}