summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkokke <spam@rowdy.dk>2017-12-01 01:00:47 +0100
committerGitHub <noreply@github.com>2017-12-01 01:00:47 +0100
commit0a8bafcd8d4cdb5c107a1c2a0ea94518c99ab49b (patch)
treef33633368e654bcef00b55848f08233c2f8110f6
parentadding CTR-mode (diff)
downloadtiny-AES-c-0a8bafcd8d4cdb5c107a1c2a0ea94518c99ab49b.tar
tiny-AES-c-0a8bafcd8d4cdb5c107a1c2a0ea94518c99ab49b.tar.gz
tiny-AES-c-0a8bafcd8d4cdb5c107a1c2a0ea94518c99ab49b.tar.bz2
tiny-AES-c-0a8bafcd8d4cdb5c107a1c2a0ea94518c99ab49b.tar.lz
tiny-AES-c-0a8bafcd8d4cdb5c107a1c2a0ea94518c99ab49b.tar.xz
tiny-AES-c-0a8bafcd8d4cdb5c107a1c2a0ea94518c99ab49b.tar.zst
tiny-AES-c-0a8bafcd8d4cdb5c107a1c2a0ea94518c99ab49b.zip
-rw-r--r--aes.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/aes.h b/aes.h
index 8dd2d3b..943dd8b 100644
--- a/aes.h
+++ b/aes.h
@@ -18,6 +18,11 @@
#define ECB 1
#endif
+#ifndef CTR
+ #define CTR 1
+#endif
+
+
#define AES128 1
//#define AES192 1
//#define AES256 1
@@ -38,4 +43,12 @@ void AES_CBC_decrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, co
#endif // #if defined(CBC) && (CBC == 1)
+#if defined(CTR) && (CTR == 1)
+
+/* Symmetrical operation: same function for encrypting as for decrypting */
+void AES_CTR_xcrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, const uint8_t* key, const uint8_t* iv);
+
+#endif // #if defined(CTR) && (CTR == 1)
+
+
#endif //_AES_H_