PemEncoding.FindUtf8(ReadOnlySpan<Byte>) Method

Definition

Finds the first PEM-encoded data.

public:
 static System::Security::Cryptography::PemFields FindUtf8(ReadOnlySpan<System::Byte> pemData);
public static System.Security.Cryptography.PemFields FindUtf8(ReadOnlySpan<byte> pemData);
static member FindUtf8 : ReadOnlySpan<byte> -> System.Security.Cryptography.PemFields
Public Shared Function FindUtf8 (pemData As ReadOnlySpan(Of Byte)) As PemFields

Parameters

pemData
ReadOnlySpan<Byte>

The text containing the PEM-encoded data.

Returns

A value that specifies the location, label, and data location of the encoded data.

Exceptions

pemData does not contain a well-formed PEM-encoded value.

Remarks

IETF RFC 7468 permits different decoding rules. This method always uses lax rules.

This does not validate the UTF-8 data outside of encapsulation boundaries and is ignored. It is the caller's responsibility to ensure the entire input is UTF-8 if required.

Applies to