rsa_signature

Function rsa_signature 

Source
pub fn rsa_signature(private_key_pem: &str, data: &str) -> Result<String>
Expand description

Signs data using RSA PKCS#1 v1.5 SHA-256 with the provided private key in PEM format.

ยงErrors

Returns an error if:

  • data is empty.
  • private_key_pem is not a valid PEM-encoded PKCS#8 RSA private key or cannot be parsed.
  • Signature generation fails due to key or cryptographic errors.