Skip to main content

import_signing_key_jwk

Function import_signing_key_jwk 

Source
pub async fn import_signing_key_jwk(
    jwk: impl Into<String>,
    options: SigningKeyOptions,
) -> Result<SigningKey, Error>
Expand description

Import a signing key as an RFC 8037 OKP private JWK (kty: "OKP", crv: "Ed25519", with x and d both required; as JSON text). An alg member, when present, must be "Ed25519" or "EdDSA".

Security: implementations MAY reject a JWK whose x is not the public key of d, and never trust x for any operation.