Uređivanje

Dijeli putem


PemEncoding.Write(ReadOnlySpan<Char>, ReadOnlySpan<Byte>) Method

Definition

Creates an encoded PEM with the given label and data.

public:
 static cli::array <char> ^ Write(ReadOnlySpan<char> label, ReadOnlySpan<System::Byte> data);
public static char[] Write (ReadOnlySpan<char> label, ReadOnlySpan<byte> data);
static member Write : ReadOnlySpan<char> * ReadOnlySpan<byte> -> char[]
Public Shared Function Write (label As ReadOnlySpan(Of Char), data As ReadOnlySpan(Of Byte)) As Char()

Parameters

label
ReadOnlySpan<Char>

The label to encode.

data
ReadOnlySpan<Byte>

The data to encode.

Returns

Char[]

A character array of the encoded PEM.

Exceptions

label exceeds the maximum possible label length.

-or-

data exceeds the maximum possible encoded data length.

The resulting PEM-encoded text is larger than Int32.MaxValue.

-or-

label contains invalid characters.

Remarks

This method always wraps the base-64 encoded text to 64 characters, per the recommended wrapping of RFC-7468. Unix-style line endings are used for line breaks.

Applies to