Function thumbprint_ed25519

Source
pub fn thumbprint_ed25519(x_b64: &str, crv: &str) -> String
Expand description

RFC 7638 JWK thumbprint for an Ed25519 public key.

Returns the base64url-no-pad SHA-256 of the canonical JSON {"crv":"<crv>","kty":"OKP","x":"<base64url-x>"}. The argument crv defaults to "Ed25519" if the caller passes an empty string; the caller is expected to validate non-default crv values upstream.

ยงErrors

Returns Err only if the x argument is not valid base64url.