/
View dependency graph
Depends on
- dh-cargo (dh-cargo)
- cargo, debhelper-compat, librust-base64-0.22+alloc-dev, librust-base64-0.22+std-dev, librust-serde-1+std-dev, librust-serde-1-dev, libstd-rust-dev, rustc
README (full)
pem
A Rust library for parsing and encoding PEM-encoded data.
Documentation
Module documentation with examples
Usage
Add this to your Cargo.toml:
[dependencies]
pem = "3.0"
Here is a simple example that parse PEM-encoded data and prints the tag:
use pem::parse;
const SAMPLE: &'static str = "-----BEGIN RSA PRIVATE KEY-----
MIIBPQIBAAJBAOsfi5AGYhdRs/x6q5H7kScxA0Kzzqe6WI6gf6+tc6IvKQJo5rQc
dWWSQ0nRGt2hOPDO+35NKhQEjBQxPh/v7n0CAwEAAQJBAOGaBAyuw0ICyENy5NsO
2gkT00AWTSzM9Zns0HedY31yEabkuFvrMCHjscEF7u3Y6PB7An3IzooBHchsFDei
AAECIQD/JahddzR5K3A6rzTidmAf1PBtqi7296EnWv8WvpfAAQIhAOvowIXZI4Un
DXjgZ9ekuUjZN+GUQRAVlkEEohGLVy59AiEA90VtqDdQuWWpvJX0cM08V10tLXrT
TTGsEtITid1ogAECIQDAaFl90ZgS5cMrL3wCeatVKzVUmuJmB/VAmlLFFGzK0QIh
ANJGc7AFk4fyFD/OezhwGHbWmo/S+bfeAiIh2Ss2FxKJ
-----END RSA PRIVATE KEY-----
";
let pem = parse(SAMPLE)?;
println!("PEM tag: {}", pem.tag);
| dir | .github/ |
| dir | benches/ |
| dir | debian/ |
| dir | src/ |
| file | .cargo_vcs_info.json |
| file | .gitignore |
| file | CHANGELOG.md |
| file | Cargo.toml |
| file | Cargo.toml.orig |
| file | LICENSE.md |
| file | README.md |