共用方式為


X509CertSelector.GetSubjectAsBytes Method

Definition

Returns the subject criterion as a byte array.

[Android.Runtime.Register("getSubjectAsBytes", "()[B", "GetGetSubjectAsBytesHandler")]
public virtual byte[]? GetSubjectAsBytes ();
[<Android.Runtime.Register("getSubjectAsBytes", "()[B", "GetGetSubjectAsBytesHandler")>]
abstract member GetSubjectAsBytes : unit -> byte[]
override this.GetSubjectAsBytes : unit -> byte[]

Returns

Byte[]

a byte array containing the required subject distinguished name in ASN.1 DER format (or null)

Attributes

Exceptions

if encoding the subject fails.

Remarks

Returns the subject criterion as a byte array. This distinguished name must match the subject distinguished name in the X509Certificate. If null, the subject criterion is disabled and any subject distinguished name will do.

If the value returned is not null, it is a byte array containing a single DER encoded distinguished name, as defined in X.501. The ASN.1 notation for this structure is supplied in the documentation for #setSubject(byte [] subjectDN) setSubject(byte [] subjectDN).

Note that the byte array returned is cloned to protect against subsequent modifications.

Java documentation for java.security.cert.X509CertSelector.getSubjectAsBytes().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to