vncore / com.venuenext.vncore.security / Crypto / checkHmac

checkHmac

fun checkHmac(data: ByteArray, key: ByteArray, expectedHmac: ByteArray): Boolean

Checks the HMAC for the given data and the given key to match the expectedHmac.

The HMAC comparison is done in a timing attack proof way.

Return
True if the HMAC matches, false otherwise.