moonzero · control plane v0.15.0 · 49 packages · 4 targets · Apache-2.0 docs / edge / rsa GitHub

10 / EDGE

rsa

The RSA decrypter a content-security key set is built from: raw RSA private operation, PKCS#1 v1.5 unpadding, and a PEM or DER reader that is a pure function of the text.

struct RsaDecrypter

structA content-security key: an RSA private key and the PKCS#1 v1.5 unpad the envelope needs.

fn RsaDecrypter::new(key : @rsa.PrivateKey) -> RsaDecrypter

fnWrap an RSA private key as a decrypter.

fn RsaDecrypter::from_der(der : BytesView) -> RsaDecrypter raise

fnBuild a decrypter from a PKCS#1 RSAPrivateKey DER structure, the body of a -----BEGIN RSA PRIVATE KEY----- block.

fn RsaDecrypter::from_pem(pem : StringView) -> RsaDecrypter raise

fnBuild a decrypter from a **PEM** document: a RSA PRIVATE KEY or a PRIVATE KEY (PKCS#8) block. The reader is a pure function of the text, so which file to read and how stays the caller's decision.

suberror Failure

itemThe one failure a decrypter reports: the sealed block is not one.

extend RsaDecrypter with Decrypter::

item