5 unstable releases
0.3.0 | Nov 7, 2021 |
---|---|
0.2.1 | Aug 11, 2019 |
0.2.0 | Aug 11, 2019 |
0.1.1 | Aug 9, 2019 |
0.1.0 | Aug 9, 2019 |
#1241 in Cryptography
9,222 downloads per month
Used in fewer than 9 crates
10KB
114 lines
rsa-der
A simple crate to encode and decode RSA public keys to DER-encoded bytes.
See the documentation for examples.
lib.rs
:
A simple crate to encode and decode DER-formatted public RSA keys.
Public keys are passed to and returned from functions simply using the n
and e
components, so any RSA library can be used in conjunction with this crate.
Examples
Convert an RSA public key to DER bytes:
use rand::rngs::OsRng;
let key = generate_key();
let der_bytes = rsa_der::public_key_to_der(&key.n().to_bytes_be(), &key.e().to_bytes_be());
Dependencies
~1.4–2MB
~43K SLoC