Documentation ¶
Overview ¶
Package armor implements OpenPGP ASCII Armor, see RFC 4880. OpenPGP Armor is very similar to PEM except that it has an additional CRC checksum.
Deprecated: this package is unmaintained except for security fixes. New applications should consider a more focused, modern alternative to OpenPGP for their specific task. If you are required to interoperate with OpenPGP systems and need a maintained package, consider a community fork. See https://golang.org/issue/44226.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ArmorCorrupt error = errors.StructuralError("armor invalid")
Functions ¶
Types ¶
type Block ¶
type Block struct { Type string // The type, taken from the preamble (i.e. "PGP SIGNATURE"). Header map[string]string // Optional headers. Body io.Reader // A Reader from which the contents can be read // contains filtered or unexported fields }
A Block represents an OpenPGP armored structure.
The encoded form is:
-----BEGIN Type----- Headers base64-encoded Bytes '=' base64 encoded checksum -----END Type-----
where Headers is a possibly empty sequence of Key: Value lines.
Since the armored data can be very large, this package presents a streaming interface.