• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class PemEncoding

Reads and writes PEM-encoded blocks (RFC 7468). Reading is tolerant of leading text and whitespace; writing always produces spec-compliant output with base64 wrapped at 64 characters per line.

Inheritance
object
PemEncoding
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DRIT.Mail.Rfc.Crypto
Assembly: DRIT.Mail.dll
Syntax
public static class PemEncoding

Methods

View Source

ReadAll(string)

Reads all PEM blocks from the given text.

Declaration
public static IReadOnlyList<PemBlock> ReadAll(string pemText)
Parameters
Type Name Description
string pemText

The pem text used by the operation.

Returns
Type Description
IReadOnlyList<PemBlock>
View Source

ReadFirst(string)

Reads the first PEM block from the given text. Returns null if no block is found.

Declaration
public static PemBlock? ReadFirst(string pemText)
Parameters
Type Name Description
string pemText

The pem text used by the operation.

Returns
Type Description
PemBlock
View Source

Write(string, byte[])

Writes a PEM block with the given label and DER data. The base64 content is wrapped at 64 characters per line.

Declaration
public static string Write(string label, byte[] derData)
Parameters
Type Name Description
string label

Specifies the label value.

byte[] derData

The der data used by the operation.

Returns
Type Description
string
  • View Source
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX