Skip to main content

import_encryption_key_jwk

Function import_encryption_key_jwk 

Source
pub async fn import_encryption_key_jwk(
    variant: RsaVariant,
    jwk: impl Into<String>,
) -> Result<EncryptionKey, Error>
Expand description

Import a public key as an RSA public JWK (kty: "RSA", with n and e, as JSON text). An alg member, when present, must be the variant’s JOSE alg ("RSA-OAEP-256", "RSA-OAEP-384", or "RSA-OAEP-512"). See the WIT mac-key.export-key-jwk doc for the package-wide JWK contract.