Added generichash keygen
This commit is contained in:
1 parent
16cb5c2dee
commit
1878144b8f
6 files changed
+27
-2
No files matched your search
+2
@@ -26,6 +26,8 @@ interface JsSodiumInterface {
|
||||
|
||||
fun crypto_generichash_final(state: dynamic, hashLength: Int) : Uint8Array
|
||||
|
||||
fun crypto_generichash_keygen() : Uint8Array
|
||||
|
||||
//Short hash
|
||||
fun crypto_shorthash(data : Uint8Array, key: Uint8Array) : Uint8Array
|
||||
|
||||
|
||||
+4
@@ -44,4 +44,8 @@ actual object GenericHash {
|
||||
actual fun genericHashFinal(state: GenericHashState): UByteArray {
|
||||
return getSodium().crypto_generichash_final(state.internalState, state.hashLength).toUByteArray()
|
||||
}
|
||||
|
||||
actual fun genericHashKeygen(): UByteArray {
|
||||
return getSodium().crypto_generichash_keygen().toUByteArray()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user