summaryrefslogtreecommitdiff
path: root/internal/stupidgcm/chacha.h
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-09-03 17:11:57 +0200
committerJakob Unterwurzacher2021-09-07 18:14:05 +0200
commit69d626b26f5a3f55c752b59af44710b992e2ab76 (patch)
tree030d8b65aedb4a6d8e40c3f9c3552775a38d0669 /internal/stupidgcm/chacha.h
parenta3f5a8492a8bc62d8e2a639bd449b425efa66ce2 (diff)
stupidgcm: replace chacha20poly1305_seal with generic aead_seal
Diffstat (limited to 'internal/stupidgcm/chacha.h')
-rw-r--r--internal/stupidgcm/chacha.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/internal/stupidgcm/chacha.h b/internal/stupidgcm/chacha.h
new file mode 100644
index 0000000..780350a
--- /dev/null
+++ b/internal/stupidgcm/chacha.h
@@ -0,0 +1,17 @@
+enum aeadType {
+ aeadTypeChacha = 1,
+ aeadTypeGcm = 2,
+};
+
+int aead_seal(
+ const enum aeadType cipherId,
+ const unsigned char* const plaintext,
+ const int plaintextLen,
+ const unsigned char* const authData,
+ const int authDataLen,
+ const unsigned char* const key,
+ const int keyLen,
+ const unsigned char* const iv,
+ const int ivLen,
+ unsigned char* const ciphertext,
+ const int ciphertextBufLen);