diff options
author | Niels Möller <nisse@lysator.liu.se> | 2022-05-14 22:34:14 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2023-02-06 20:20:01 +0100 |
commit | 1a99a80c1aa3b5fda73689adc6d9c0f5a05c4bb6 (patch) | |
tree | f196047ab0bee518d38f21e95dc2f508a44427c5 | |
parent | 175320ed6670ed7a14284a608d5419dae42b3619 (diff) | |
download | nettle-1a99a80c1aa3b5fda73689adc6d9c0f5a05c4bb6.tar.gz |
ocb: Delete unneeded zero checks.
-rw-r--r-- | ocb.c | 9 |
1 files changed, 0 insertions, 9 deletions
@@ -150,9 +150,6 @@ ocb_update (struct ocb_ctx *ctx, const struct ocb_key *key, const void *cipher, nettle_cipher_func *f, size_t length, const uint8_t *data) { - if (data == 0) - return; - assert (ctx->message_count == 0); if (ctx->data_count == 0) @@ -184,9 +181,6 @@ ocb_encrypt (struct ocb_ctx *ctx, const struct ocb_key *key, const void *cipher, nettle_cipher_func *f, size_t length, uint8_t *dst, const uint8_t *src) { - if (length == 0) - return; - if (ctx->message_count == 0) ctx->offset = ctx->initial; @@ -222,9 +216,6 @@ ocb_decrypt (struct ocb_ctx *ctx, const struct ocb_key *key, const void *decrypt_ctx, nettle_cipher_func *decrypt, size_t length, uint8_t *dst, const uint8_t *src) { - if (length == 0) - return; - if (ctx->message_count == 0) ctx->offset = ctx->initial; |