Slow progress.

This commit is contained in:
Ugljesa Jovanovic authored and Ugljesa Jovanovic committed 2020-08-21 18:55:17 +02:00
1 parent cd90f964ab
commit be4468785d
9 files changed
+122 -54

No files matched your search

@@ -117,11 +117,12 @@ actual class Crypto internal actual constructor() {
state: SecretStreamState,
c: UByteArray,
ad: UByteArray
): UByteArray {
): DecryptedDataAndTag {
val m = UByteArray(c.size - 17)
var tag_p : UByte = 0U
println("Debug crypto_secretstream_xchacha20poly1305_pull")
sodium.crypto_secretstream_xchacha20poly1305_pull(state, m.asByteArray(), null, null,
sodium.crypto_secretstream_xchacha20poly1305_pull(state, m.asByteArray(), null, tag_p.toByte(),
c.asByteArray(), c.size.toLong(), ad.asByteArray(), ad.size.toLong())
return m
return debug.test.DecryptedDataAndTag(m, tag_p)
}
}