All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jsMain.jslibs.miscreant.interfaces.module_miscreant.kt Maven / Gradle / Ivy

Go to download

A Kotlin multiplatform REST client utilizing secret network's gRPC gateway endpoints.

There is a newer version: 6.4.1-rc
Show newest version
@file:Suppress(
    "INTERFACE_WITH_SUPERCLASS",
    "OVERRIDING_FINAL_MEMBER",
    "RETURN_TYPE_MISMATCH_ON_OVERRIDE",
    "CONFLICTING_OVERLOADS"
)
@file:JsModule("miscreant")
@file:JsNonModule

package jslibs.miscreant

import org.khronos.webgl.Uint8Array
import kotlin.js.Promise

external interface IBlockCipher {
    fun clear(): IBlockCipher /* this */
    fun encryptBlock(block: Block): Promise
}

external interface ICryptoProvider {
    fun importBlockCipherKey(keyData: Uint8Array): Promise
    fun importCTRKey(keyData: Uint8Array): Promise
}

external interface ICTRLike {
    fun encryptCtr(iv: Uint8Array, plaintext: Uint8Array): Promise
    fun clear(): ICTRLike /* this */
}

external interface IMACLike {
    fun reset(): IMACLike /* this */
    fun clear()
    fun update(data: Uint8Array): Promise
    fun finish(): Promise
}

external interface ISIVLike {
    fun seal(plaintext: Uint8Array, associatedData: Array): Promise
    fun open(ciphertext: Uint8Array, associatedData: Array): Promise
    fun clear(): ISIVLike /* this */
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy