Function ruma_signatures::verify_json [] [src]

pub fn verify_json<V>(verifier: &V,
                      public_key: &[u8],
                      signature: &Signature,
                      value: &Value)
                      -> Result<(), Error> where V: Verifier

Use a public key to verify a signature of a JSON object.

Parameters

  • verifier: A Verifier appropriate for the digital signature algorithm that was used.
  • public_key: The public key of the key pair used to sign the JSON, as a series of bytes.
  • signature: The Signature to verify.
  • value: The serde_json::Value (JSON value) that was signed.

Errors

Returns an error if verification fails.