Returns whether digital signature is valid.

  • Returns whether digital signature is valid.

    Parameters

    • algorithm: SigningAlgorithm

      Signing algorithm and parameters

    • key: string

      A PEM-encoded public key or X.509 certificate

    • signature: ArrayBuffer

      Signature to verify

    • plaintext: ArrayBuffer

      Input data that was signed

    Returns boolean

    Will throw an error if the key is not compatible with the signing algorithm or if an unknown algorithm is used.