Creates an X500Principal by wrapping an X500Name.
Creates an {@code X500Principal} from a string representation of an X.500 distinguished name (ex: "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US"). The distinguished name must be specified using the grammar defined in RFC 1779 or RFC 2253 (either format is acceptable).
Creates an {@code X500Principal} from a string representation of an X.500 distinguished name (ex: "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US"). The distinguished name must be specified using the grammar defined in RFC 1779 or RFC 2253 (either format is acceptable).
Creates an {@code X500Principal} from a distinguished name in ASN.1 DER encoded form. The ASN.1 notation for this structure is as follows. <pre>{@code Name ::= CHOICE { RDNSequence }
Returns the distinguished name in ASN.1 DER encoded form. The ASN.1 notation for this structure is supplied in the documentation for {@link #X500Principal(byte[] name) X500Principal(byte[] name)}.
Returns a string representation of the X.500 distinguished name using the format defined in RFC 2253.
Returns a string representation of the X.500 distinguished name using the specified format. Valid values for the format are "RFC1779", "RFC2253", and "CANONICAL" (case insensitive).
Returns a string representation of the X.500 distinguished name using the specified format. Valid values for the format are "RFC1779" and "RFC2253" (case insensitive). "CANONICAL" is not permitted and an {@code IllegalArgumentException} will be thrown.
Compares the specified {@code Object} with this {@code X500Principal} for equality.
Return a hash code for this {@code X500Principal}.
Return a user-friendly string representation of this {@code X500Principal}.
Canonical string format of Distinguished Names.
RFC 1779 string format of Distinguished Names.
RFC 2253 string format of Distinguished Names.
Returns the name of this principal.
<p> This class represents an X.500 {@code Principal}. {@code X500Principal}s are represented by distinguished names such as "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US".
<p> This class can be instantiated by using a string representation of the distinguished name, or by using the ASN.1 DER encoded byte representation of the distinguished name. The current specification for the string representation of a distinguished name is defined in <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253: Lightweight Directory Access Protocol (v3): UTF-8 string Representation of Distinguished Names</a>. This class, however, accepts string formats from both RFC 2253 and <a href="http://www.ietf.org/rfc/rfc1779.txt">RFC 1779: A string Representation of Distinguished Names</a>, and also recognizes attribute type keywords whose OIDs (Object Identifiers) are defined in <a href="http://www.ietf.org/rfc/rfc3280.txt">RFC 3280: Internet X.509 Public Key Infrastructure Certificate and CRL Profile</a>.
<p> The string representation for this {@code X500Principal} can be obtained by calling the {@code getName} methods.
<p> Note that the {@code getSubjectX500Principal} and {@code getIssuerX500Principal} methods of {@code X509Certificate} return X500Principals representing the issuer and subject fields of the certificate.
@see java.security.cert.X509Certificate @since 1.4