Fixed (the usual) copypaste error of removing ABYTES in detached implementation, added aead chacha tests

This commit is contained in:
Ugljesa Jovanovic authored and Ugljesa Jovanovic committed 2020-08-30 12:24:43 +02:00
1 parent 1a11bdc81b
commit 3f9f316e04
3 files changed
+323 -4

No files matched your search

@@ -152,7 +152,7 @@ actual object AuthenticatedEncryptionWithAssociatedData {
val noncePinned = nonce.pin()
val keyPinned = key.pin()
val message = UByteArray(ciphertext.size - crypto_aead_xchacha20poly1305_ietf_ABYTES)
val message = UByteArray(ciphertext.size)
val messagePinned = message.pin()
val validationResult = crypto_aead_xchacha20poly1305_ietf_decrypt_detached(
@@ -313,7 +313,7 @@ actual object AuthenticatedEncryptionWithAssociatedData {
val noncePinned = nonce.pin()
val keyPinned = key.pin()
val message = UByteArray(ciphertext.size - crypto_aead_chacha20poly1305_ietf_ABYTES)
val message = UByteArray(ciphertext.size)
val messagePinned = message.pin()
val validationResult = crypto_aead_chacha20poly1305_ietf_decrypt_detached(
@@ -474,7 +474,7 @@ actual object AuthenticatedEncryptionWithAssociatedData {
val noncePinned = nonce.pin()
val keyPinned = key.pin()
val message = UByteArray(ciphertext.size - crypto_aead_chacha20poly1305_ABYTES)
val message = UByteArray(ciphertext.size)
val messagePinned = message.pin()
val validationResult = crypto_aead_chacha20poly1305_decrypt_detached(