31 lines
609 B
Kotlin
Raw Normal View History

2024-11-21 14:12:51 +03:00
@file:JsModule("libsodium-sumo")
package ext.libsodium
import org.khronos.webgl.Uint8Array
import kotlin.js.Promise
/**
* Created by Ugljesa Jovanovic
* ugljesa.jovanovic@ionspin.com
* on 25-May-2020
*/
@JsName("ready")
external val _libsodiumPromise : Promise<JsAny?>
2024-11-21 14:12:51 +03:00
@JsName("_sodium_init")
external fun sodium_init() : Int
external fun crypto_generichash(hashLength: Int, inputMessage: Uint8Array) : Uint8Array
external fun crypto_hash_sha256(message: Uint8Array) : Uint8Array
external fun crypto_hash_sha512(message: Uint8Array) : Uint8Array
external fun crypto_hash_sha256_init(): JsAny
2024-11-21 14:12:51 +03:00