Class DNComparator
- java.lang.Object
-
- eu.emi.security.authn.x509.helpers.DNComparator
-
public class DNComparator extends java.lang.ObjectHelpers for checking text representations of DNs for equality.- Author:
- K. Benedyczak
-
-
Constructor Summary
Constructors Constructor Description DNComparator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetHashCode(java.lang.String dn)static java.lang.StringpreNormalize(java.lang.String dn)Returns a form of the original DN which will be properly parsed by JDKX500Principalclass by replacing attribute names unknown by theX500Principalwith OIDs.
-
-
-
Method Detail
-
preNormalize
public static java.lang.String preNormalize(java.lang.String dn)
Returns a form of the original DN which will be properly parsed by JDKX500Principalclass by replacing attribute names unknown by theX500Principalwith OIDs. What is more all DC and EMAIL values are converted to lower case.- Parameters:
dn- in RFC 2253 form.- Returns:
- dn in RFC 2253 form, reformatted.
-
getHashCode
public static int getHashCode(java.lang.String dn)
- Parameters:
dn- source dn- Returns:
- hashcode useful as a return value of the hshCode() method,
when equals is overriden to use
X500NameUtilsequals method.
-
-