Function verify_canonical_json_bytes

Source
pub fn verify_canonical_json_bytes(
    algorithm: &SigningKeyAlgorithm,
    public_key: &[u8],
    signature: &[u8],
    canonical_json: &[u8],
) -> Result<(), Error>
Expand description

Check a signed JSON object using the given public key and signature, all provided as bytes.

This is a low-level function. In general you will want to use verify_event() or verify_json().

§Parameters

  • algorithm: The algorithm used for the signature. Currently this method only supports the ed25519 algorithm.
  • public_key: The raw bytes of the public key used to sign the JSON.
  • signature: The raw bytes of the signature.
  • canonical_json: The signed canonical JSON bytes. Can be obtained by calling canonical_json().

§Errors

Returns an error if verification fails.