Skip to main content

checkIntegrity

When a signature is captured it can be defined an integrity key. This function checks the integrity of the Signature object in order to detect whether it has been tampered with since signing.

Parameters
KeyType : This value has to be the same used when the signature was created, and it could be one of the following values:
Module.KeyType.None
Module.KeyType.MD5
Module.KeyType.SHA-1
Module.KeyType.SHA-224
Module.KeyType.SHA-256
Module.KeyType.SHA-384
Module.KeyType.SHA-512
Return values
The function returns a promise that resolves when it succeeds to the following possible values:
Module.IntegrityStatus.OK – Integrity Ok. Data has not changed since signature capture.
Module.IntegrityStatus.FAIL – Integrity Fail. Data has changed since signature capture.
Module.IntegrityStatus.MISSING – Integrity Missing. Signature integrity value not found.
Module.IntegrityStatus.WRONG_TYPE – Integrity wrong type. Signature was captured using a different integrity check version.
Module.IntegrityStatus.INSUFFICIENT_DATA – There is not enough signature data.
Module.IntegrityStatus.UNCERTAIN – The integrity is uncertain.
Module.IntegrityStatus.NOT_SUPPORTED – The integrity type is not supported in this version of the Signature SDK.