PemEncoding.WriteString Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
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.