Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jcreekmore/pem-rs
https://github.com/jcreekmore/pem-rs
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jcreekmore/pem-rs
- Owner: jcreekmore
- License: mit
- Created: 2016-02-21T17:13:36.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-04-08T13:32:48.000Z (9 months ago)
- Last Synced: 2024-08-19T09:43:57.461Z (5 months ago)
- Language: Rust
- Size: 1.58 MB
- Stars: 54
- Watchers: 3
- Forks: 32
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-rust-cn - jcreekmore/pem-rs - encoded data [<img src="https://api.travis-ci.org/jcreekmore/pem-rs.svg?branch=master">](https://travis-ci.org/jcreekmore/pem-rs) (Libraries / Encoding)
- awesome-rust - jcreekmore/pem-rs - encoded data [<img src="https://api.travis-ci.org/jcreekmore/pem-rs.svg?branch=master">](https://travis-ci.org/jcreekmore/pem-rs) (Libraries / Encoding)
- awesome-rust - jcreekmore/pem-rs - encoded data (Libraries / Encoding)
- awesome-rust-cn - jcreekmore/pem-rs
- awesome-rust-zh - jcreekmore/pem-rs - 基于 Rust 的解析和编码 PEM 编码数据的方法[<img src="https://api.travis-ci.org/jcreekmore/pem-rs.svg?branch=master">](https://travis-ci.org/jcreekmore/pem-rs) (库 / 编码(Encoding))
- awesome-rust - jcreekmore/pem-rs - Parse and encode PEM-encoded data (Libraries / Encoding)
- awesome-rust - jcreekmore/pem-rs - encoded data [<img src="https://api.travis-ci.org/jcreekmore/pem-rs.svg?branch=master">](https://travis-ci.org/jcreekmore/pem-rs) (库 Libraries / 加密 Encoding)
- fucking-awesome-rust - jcreekmore/pem-rs - Parse and encode PEM-encoded data (Libraries / Encoding)
- fucking-awesome-rust - jcreekmore/pem-rs - Parse and encode PEM-encoded data (Libraries / Encoding)
README
pem
===A Rust library for parsing and encoding PEM-encoded data.
![Build Status](https://github.com/github/docs/actions/workflows/ci.yml/badge.svg)
### Documentation
[Module documentation with examples](https://docs.rs/pem/)### Usage
Add this to your `Cargo.toml`:
```toml
[dependencies]
pem = "3.0"
```Here is a simple example that parse PEM-encoded data and prints the tag:
```rust
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);```