[−][src]Crate rsa_der
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());
Enums
| Error | Error type for |
Functions
| public_key_from_der | Decodes a DER-encoded public key into the raw
|
| public_key_to_der | Encodes an RSA public key to DER bytes, as specified by the PKCS#8 format. |
Type Definitions
| Result | Result type for |