Skip to main content

checkSignedData

Checks for a match between a given hash and the one provided when the signature was captured. If the signature is bound to a hash, then this function checks the signed data against that from which the supplied hash was derived.

Parameters
Hash: A hash object with the type and value of the document to check.
Return values
The function returns a promise that resolves when it succeeds to the following possible values:
Module.DataStatus.GOOD – The supplied hash matches that provided when the signature was captured. Thus, both hash objects have been derived from the same data set.
Module.DataStatus.NO_HASH – No hash was specified when the signature was captured (or the object does not contain a signature).
Module.DataStatus.BAD_TYPE – The supplied hash is of a different type to that provided when the signature was captured.
Module.DataStatus.BAD_HASH – The supplied hash value does not match that provided when the signature was captured, meaning that the two hash objects have been derived from different data sets.
Module.DataStatus.ERROR – Unknown error.
Module.DataStatus.UNCERTAIN – The data is uncertain.
Module.DataStatus.SIG_MOVED – The signature has been moved.