Module armor

Source
Expand description

ASCII Armor.

This module deals with ASCII Armored data (see Section 6 of RFC 9580).

§Scope

This implements a subset of the ASCII Armor specification. Not supported multipart messages.

§Memory allocations

Both the reader and the writer allocate memory in the order of the size of chunks read or written.

§Examples

use sequoia_openpgp as openpgp;
use std::fs::File;
use openpgp::armor::{Reader, ReaderMode, Kind};

let mut file = File::open("somefile.asc")?;
let mut r = Reader::from_reader(&mut file, ReaderMode::Tolerant(Some(Kind::File)));

Structs§

Reader
A filter that strips ASCII Armor from a stream of data.
Writer
A filter that applies ASCII Armor to the data written to it.

Enums§

Kind
Specifies the type of data (see Section 6.2 of RFC 9580).
ReaderMode
How an ArmorReader should act.