Skip to main content

import_verifying_key_jwk

Function import_verifying_key_jwk 

Source
pub async fn import_verifying_key_jwk(
    variant: EcdsaVariant,
    jwk: impl Into<String>,
) -> Result<VerifyingKey, Error>
Expand description

Import a public key as an EC public JWK (kty: "EC", with crv, x, and y; as JSON text). The JWK’s crv must match the declared variant’s curve, and an alg member, when present, must be the curve’s JOSE signature alg ("ES256" for P-256, "ES384" for P-384). See the WIT mac-key.export-key-jwk doc for the package-wide JWK contract.