Add state cleanup for delegated and pure. There doesn't seem to be a easy way to clean js state
This commit is contained in:
1 parent
1293b9ea75
commit
52b6a4ad8e
11 files changed
+51
-6
No files matched your search
+4
@@ -52,5 +52,9 @@ interface JsSodiumInterface {
|
||||
fun crypto_secretstream_xchacha20poly1305_init_pull(header: Uint8Array, key: Uint8Array) : dynamic
|
||||
fun crypto_secretstream_xchacha20poly1305_pull(state: dynamic, ciphertext: Uint8Array, additionalData: Uint8Array) : dynamic
|
||||
|
||||
//util
|
||||
fun memzero(array: Uint8Array)
|
||||
|
||||
|
||||
|
||||
}
|
||||
+4
@@ -121,6 +121,10 @@ actual class XChaCha20Poly1305Delegated internal actual constructor() {
|
||||
return decrypted.toUByteArray()
|
||||
}
|
||||
|
||||
actual fun cleanup() {
|
||||
//TODO JS cleanup
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user