summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2022-05-14 22:34:14 +0200
committerNiels Möller <nisse@lysator.liu.se>2023-02-06 20:20:01 +0100
commit1a99a80c1aa3b5fda73689adc6d9c0f5a05c4bb6 (patch)
treef196047ab0bee518d38f21e95dc2f508a44427c5
parent175320ed6670ed7a14284a608d5419dae42b3619 (diff)
downloadnettle-1a99a80c1aa3b5fda73689adc6d9c0f5a05c4bb6.tar.gz
ocb: Delete unneeded zero checks.
-rw-r--r--ocb.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/ocb.c b/ocb.c
index 880c11a4..37f821f7 100644
--- a/ocb.c
+++ b/ocb.c
@@ -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;