mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2026-11-13 23:42:56 +00:00
hmacSha256 and hex
This commit is contained in:
1 parent
848bc5ec10
commit
31fbd3cad7
8 files changed
+75
-1
No files matched your search
@@ -7,3 +7,9 @@ external interface CryptoJs {
|
||||
@JsModule("crypto-js")
|
||||
@JsNonModule
|
||||
external val CryptoJS: CryptoJs
|
||||
|
||||
actual fun SourceString.hmacSha256(key: String) = CryptoJS.asDynamic().HmacSHA256(this, key).unsafeCast<String>()
|
||||
|
||||
actual fun SourceBytes.hex() = CryptoJS.asDynamic().format.Hex(this).unsafeCast<String>()
|
||||
|
||||
actual fun SourceString.hex() = CryptoJS.asDynamic().format.Hex(this).unsafeCast<String>()
|
||||
Reference in new issue
Block a user