1package org.bouncycastle.asn1.x500; 2 3import org.bouncycastle.asn1.ASN1Encodable; 4import org.bouncycastle.asn1.ASN1ObjectIdentifier; 5 6/** 7 * It turns out that the number of standard ways the fields in a DN should be 8 * encoded into their ASN.1 counterparts is rapidly approaching the 9 * number of machines on the internet. By default the X500Name class 10 * will produce UTF8Strings in line with the current recommendations (RFC 3280). 11 * <p> 12 */ 13public interface X500NameStyle 14{ 15 /** 16 * Convert the passed in String value into the appropriate ASN.1 17 * encoded object. 18 * 19 * @param oid the oid associated with the value in the DN. 20 * @param value the value of the particular DN component. 21 * @return the ASN.1 equivalent for the value. 22 */ 23 ASN1Encodable stringToValue(ASN1ObjectIdentifier oid, String value); 24 25 ASN1ObjectIdentifier attrNameToOID(String attrName); 26 27 boolean areEqual(X500Name name1, X500Name name2); 28 29 RDN[] fromString(String dirName); 30 31 int calculateHashCode(X500Name name); 32 33 String toString(X500Name name); 34} 35