Skip to main content

is_rsa_pkcs8_der

Function is_rsa_pkcs8_der 

Source
pub fn is_rsa_pkcs8_der(der: &[u8]) -> bool
Expand description

Reports whether der is a PKCS#8 PrivateKeyInfo whose AlgorithmIdentifier is rsaEncryption (1.2.840.113549.1.1.1).

This crate does not implement RSA private keys. The predicate lets callers recognise an RSA key and report a clear “unsupported” error rather than a generic parse failure. It only inspects the algorithm identifier, so it returns false for malformed input.