-/* $OpenBSD: e_camellia.c,v 1.12 2022/09/04 13:17:18 jsing Exp $ */
+/* $OpenBSD: e_camellia.c,v 1.13 2022/09/04 15:54:42 jsing Exp $ */
/* ====================================================================
* Copyright (c) 2006 The OpenSSL Project. All rights reserved.
*
{
size_t chunk = EVP_MAXCHUNK;
- if (128 == 1)
- chunk >>= 3;
-
if (inl < chunk)
chunk = inl;
while (inl && inl >= chunk) {
- Camellia_cfb128_encrypt(in, out, (long)((128 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? inl * 8 : inl), &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
+ Camellia_cfb128_encrypt(in, out, (long)inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
inl -= chunk;
in += chunk;
out += chunk;
{
size_t chunk = EVP_MAXCHUNK;
- if (128 == 1)
- chunk >>= 3;
-
if (inl < chunk)
chunk = inl;
while (inl && inl >= chunk) {
- Camellia_cfb128_encrypt(in, out, (long)((128 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? inl * 8 : inl), &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
+ Camellia_cfb128_encrypt(in, out, (long)inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
inl -= chunk;
in += chunk;
out += chunk;
{
size_t chunk = EVP_MAXCHUNK;
- if (128 == 1)
- chunk >>= 3;
-
if (inl < chunk)
chunk = inl;
while (inl && inl >= chunk) {
- Camellia_cfb128_encrypt(in, out, (long)((128 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? inl * 8 : inl), &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
+ Camellia_cfb128_encrypt(in, out, (long)inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
inl -= chunk;
in += chunk;
out += chunk;
{
size_t chunk = EVP_MAXCHUNK;
- if (1 == 1)
- chunk >>= 3;
+ chunk >>= 3;
if (inl < chunk)
chunk = inl;
{
size_t chunk = EVP_MAXCHUNK;
- if (1 == 1)
- chunk >>= 3;
+ chunk >>= 3;
if (inl < chunk)
chunk = inl;
{
size_t chunk = EVP_MAXCHUNK;
- if (1 == 1)
- chunk >>= 3;
+ chunk >>= 3;
if (inl < chunk)
chunk = inl;
{
size_t chunk = EVP_MAXCHUNK;
- if (8 == 1)
- chunk >>= 3;
-
if (inl < chunk)
chunk = inl;
while (inl && inl >= chunk) {
- Camellia_cfb8_encrypt(in, out, (long)((8 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? inl * 8 : inl), &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
+ Camellia_cfb8_encrypt(in, out, (long)inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
inl -= chunk;
in += chunk;
out += chunk;
{
size_t chunk = EVP_MAXCHUNK;
- if (8 == 1)
- chunk >>= 3;
-
if (inl < chunk)
chunk = inl;
while (inl && inl >= chunk) {
- Camellia_cfb8_encrypt(in, out, (long)((8 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? inl * 8 : inl), &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
+ Camellia_cfb8_encrypt(in, out, (long)inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
inl -= chunk;
in += chunk;
out += chunk;
{
size_t chunk = EVP_MAXCHUNK;
- if (8 == 1)
- chunk >>= 3;
-
if (inl < chunk)
chunk = inl;
while (inl && inl >= chunk) {
- Camellia_cfb8_encrypt(in, out, (long)((8 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? inl * 8 : inl), &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
+ Camellia_cfb8_encrypt(in, out, (long)inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
inl -= chunk;
in += chunk;
out += chunk;