Performs an HMAC-SHA-256 hash function
Device (from impOS™ 36)
|dataToHash||String or blob||
The data to which the hash function will be applied
|key||String or blob||
The hash key
Blob — the hashed data (32 bytes)
The hashing function provided by crypto.hmacsha256() is computationally intensive, and customers should be aware that calling the method may have an impact on application performance on the device.
For example, on an imp004m, using 32-byte messages and keys, crypto.hmacsha256() takes approximately 1000-1100µs. For longer messages, the throughput is approximately 1.2MB/s.
The imp004m is the slowest imp currently available, so this represents the worst performance a customer might see. Other imps will perform these operations more quickly.