PemEncoding Class

Definition

Provides methods for reading and writing the IETF RFC 7468 subset of PEM (Privacy-Enhanced Mail) textual encodings. This class cannot be inherited.

C#
public static class PemEncoding
Inheritance
PemEncoding

Methods

Find(ReadOnlySpan<Char>)

Finds the first PEM-encoded data.

FindUtf8(ReadOnlySpan<Byte>)
GetEncodedSize(Int32, Int32)

Determines the length of a PEM-encoded value, in characters, given the length of a label and binary data.

TryFind(ReadOnlySpan<Char>, PemFields)

Attempts to find the first PEM-encoded data.

TryFindUtf8(ReadOnlySpan<Byte>, PemFields)
TryWrite(ReadOnlySpan<Char>, ReadOnlySpan<Byte>, Span<Char>, Int32)

Tries to write the provided data and label as PEM-encoded data into a provided buffer.

TryWriteUtf8(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>, Int32)
Write(ReadOnlySpan<Char>, ReadOnlySpan<Byte>)

Creates an encoded PEM with the given label and data.

WriteString(ReadOnlySpan<Char>, ReadOnlySpan<Byte>)

Creates an encoded PEM with the given label and data.

WriteUtf8(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

Applies to

Product Versions
.NET 5, 6, 7, 8, 9, 10