]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Spelling fix in "trad_enc_decypt_byte" code 854/head
authorGraham Percival <gperciva@tarsnap.com>
Sat, 31 Dec 2016 00:28:01 +0000 (16:28 -0800)
committerGraham Percival <gperciva@tarsnap.com>
Sat, 31 Dec 2016 00:35:47 +0000 (16:35 -0800)
Sponsored by: Tarsnap Backup Inc.

libarchive/archive_read_support_format_zip.c
libarchive/archive_write_set_format_zip.c

index a80378d9d7b3783f430f2df5c85d3b59442d35cc..cde62ee62b9d6f77d4a0a05fbcfcf5767aef93ce 100644 (file)
@@ -242,7 +242,7 @@ trad_enc_update_keys(struct trad_enc_ctx *ctx, uint8_t c)
 }
 
 static uint8_t
-trad_enc_decypt_byte(struct trad_enc_ctx *ctx)
+trad_enc_decrypt_byte(struct trad_enc_ctx *ctx)
 {
        unsigned temp = ctx->keys[2] | 2;
        return (uint8_t)((temp * (temp ^ 1)) >> 8) & 0xff;
@@ -257,7 +257,7 @@ trad_enc_decrypt_update(struct trad_enc_ctx *ctx, const uint8_t *in,
        max = (unsigned)((in_len < out_len)? in_len: out_len);
 
        for (i = 0; i < max; i++) {
-               uint8_t t = in[i] ^ trad_enc_decypt_byte(ctx);
+               uint8_t t = in[i] ^ trad_enc_decrypt_byte(ctx);
                out[i] = t;
                trad_enc_update_keys(ctx, t);
        }
index 5213db5b018a670d1c3194922b8bdc506d2c93cd..f69b8467f440f54f44ac39a45a5c12c9326e6131 100644 (file)
@@ -1499,7 +1499,7 @@ trad_enc_update_keys(struct trad_enc_ctx *ctx, uint8_t c)
 }
 
 static uint8_t
-trad_enc_decypt_byte(struct trad_enc_ctx *ctx)
+trad_enc_decrypt_byte(struct trad_enc_ctx *ctx)
 {
        unsigned temp = ctx->keys[2] | 2;
        return (uint8_t)((temp * (temp ^ 1)) >> 8) & 0xff;
@@ -1515,7 +1515,7 @@ trad_enc_encrypt_update(struct trad_enc_ctx *ctx, const uint8_t *in,
 
        for (i = 0; i < max; i++) {
                uint8_t t = in[i];
-               out[i] = t ^ trad_enc_decypt_byte(ctx);
+               out[i] = t ^ trad_enc_decrypt_byte(ctx);
                trad_enc_update_keys(ctx, t);
        }
        return i;