แก้ไข

แชร์ผ่าน


PemEncoding.WriteString Method

Definition

Creates an encoded PEM with the given label and data.

public:
 static System::String ^ WriteString(ReadOnlySpan<char> label, ReadOnlySpan<System::Byte> data);
public static string WriteString (ReadOnlySpan<char> label, ReadOnlySpan<byte> data);
static member WriteString : ReadOnlySpan<char> * ReadOnlySpan<byte> -> string
Public Shared Function WriteString (label As ReadOnlySpan(Of Char), data As ReadOnlySpan(Of Byte)) As String

Parameters

label
ReadOnlySpan<Char>

The label to encode.

data
ReadOnlySpan<Byte>

The data to encode.

Returns

A string 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 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