PemDocument
Represents a single PEM (Privacy-Enhanced Mail) document as defined by RFC 7468, consisting of a textual label, and the binary content it encapsulates
To encode the document into a PEM-encoded string use one of encodeToString, encodeToByteArray, encodeToByteString, or encodeToSink depending on the desired output type
Encoding produces the canonical PEM form:
-----BEGIN {label}-----
Base64-encoded {content} with line breaks every 64 characters
-----END {label}-----Creation of document instances can be done using one of the following methods:
using PemDocument.decode for decoding from a string or binary input
using PemDocument.decodeToSequence for decoding multiple documents from a single string or binary input
PemDocument is an immutable, thread-safe value object, with structural equality and hash code that uses both label and content.
Constructors
Creates a new PemDocument with the provided label and content
Creates a new PemDocument with the provided label and content
Properties
Functions
Encodes this document into a ByteString as a string in PEM format