[−][src]Crate rsa_der
A simple crate to convert public RSA keys to DER encoding.
Public keys are passed to 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());
Functions
public_key_to_der | Encodes an RSA public key to DER bytes, as specified by the PKCS#8 format. |