create crypto project

This commit is contained in:
2021-01-23 11:43:40 +06:00
parent d074f29b82
commit a4020cb484
13 changed files with 193 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
package dev.inmo.micro_utils.crypto
external interface CryptoJs {
fun MD5(data: String): String
}
@JsModule("crypto-js")
@JsNonModule
external val CryptoJS: CryptoJs

View File

@@ -0,0 +1,3 @@
package dev.inmo.micro_utils.crypto
actual fun SourceBytes.md5(): MD5 = CryptoJS.MD5(decodeToString())