Updated on 2026-08-14
This commit is contained in:
parent
4d73b7725e
commit
d8be65f5f7
41 changed files with 983 additions and 767 deletions
|
|
@ -0,0 +1,10 @@
|
|||
package com.tangem.domain.common.extensions
|
||||
|
||||
import javax.crypto.Mac
|
||||
import javax.crypto.spec.SecretKeySpec
|
||||
|
||||
fun ByteArray.calculateHmacSha256(key: ByteArray): ByteArray {
|
||||
val mac: Mac = Mac.getInstance("HmacSHA256")
|
||||
mac.init(SecretKeySpec(key, "HmacSHA256"))
|
||||
return mac.doFinal(this)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue