nsIDataSignatureVerifier

An interface for verifying that a given string of data was signed by the
private key matching the given public key.

Methods

verifyData(aData, aSignature, aPublicKey)

Verifies that the data matches the data that was used to generate the
signature.

Parameters

aData The data to be tested.
aSignature The signature of the data, base64 encoded.
aPublicKey The public part of the key used for signing, DER encoded then base64 encoded.

Returns

true if the signature matches the data, false if not.

verifySignature(aSignature, aSignatureLen, plaintext, plaintextLen, errorCode)

Constants

VERIFY_OK

VERIFY_ERROR_UNKNOWN_ISSUER

VERIFY_ERROR_OTHER