summaryrefslogtreecommitdiff
path: root/aes.h
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2018-08-09 21:53:55 +0200
committerNiels Möller <nisse@lysator.liu.se>2018-08-09 21:53:55 +0200
commit6a19845e6f71791ca98765d490ec08e776494bee (patch)
treec01e2160080068dff06216e5cc6a5ad63faa4f16 /aes.h
parent9d7cd5301922afebc6e0458158365001a8185c30 (diff)
downloadnettle-6a19845e6f71791ca98765d490ec08e776494bee.tar.gz
Deprecate old AES interface.
Use new macro _NETTLE_ATTTRIBUTE_DEPRECATED.
Diffstat (limited to 'aes.h')
-rw-r--r--aes.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/aes.h b/aes.h
index 5a0545c8..333ec52f 100644
--- a/aes.h
+++ b/aes.h
@@ -76,7 +76,8 @@ extern "C" {
#define AES_MIN_KEY_SIZE AES128_KEY_SIZE
#define AES_MAX_KEY_SIZE AES256_KEY_SIZE
-/* Older nettle-2.7 interface */
+/* The older nettle-2.7 AES interface is deprecated, please migrate to
+ the newer interface where each algorithm has a fixed key size. */
#define AES_KEY_SIZE 32
@@ -88,24 +89,27 @@ struct aes_ctx
void
aes_set_encrypt_key(struct aes_ctx *ctx,
- size_t length, const uint8_t *key);
+ size_t length, const uint8_t *key)
+ _NETTLE_ATTRIBUTE_DEPRECATED;
void
aes_set_decrypt_key(struct aes_ctx *ctx,
- size_t length, const uint8_t *key);
+ size_t length, const uint8_t *key)
+ _NETTLE_ATTRIBUTE_DEPRECATED;
void
aes_invert_key(struct aes_ctx *dst,
- const struct aes_ctx *src);
+ const struct aes_ctx *src)
+ _NETTLE_ATTRIBUTE_DEPRECATED;
void
aes_encrypt(const struct aes_ctx *ctx,
size_t length, uint8_t *dst,
- const uint8_t *src);
+ const uint8_t *src) _NETTLE_ATTRIBUTE_DEPRECATED;
void
aes_decrypt(const struct aes_ctx *ctx,
size_t length, uint8_t *dst,
- const uint8_t *src);
+ const uint8_t *src) _NETTLE_ATTRIBUTE_DEPRECATED;
struct aes128_ctx
{