summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/aes/aes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/aes/aes.c')
-rw-r--r--src/lib/libcrypto/aes/aes.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lib/libcrypto/aes/aes.c b/src/lib/libcrypto/aes/aes.c
index 712168e9fa..1c1c61a7a9 100644
--- a/src/lib/libcrypto/aes/aes.c
+++ b/src/lib/libcrypto/aes/aes.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: aes.c,v 1.6 2025/05/19 04:01:07 jsing Exp $ */ 1/* $OpenBSD: aes.c,v 1.7 2025/05/19 04:32:51 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2002-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2002-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -191,6 +191,18 @@ AES_ecb_encrypt(const unsigned char *in, unsigned char *out,
191LCRYPTO_ALIAS(AES_ecb_encrypt); 191LCRYPTO_ALIAS(AES_ecb_encrypt);
192 192
193void 193void
194aes_ecb_encrypt_internal(const unsigned char *in, unsigned char *out,
195 size_t len, const AES_KEY *key, int encrypt)
196{
197 while (len >= AES_BLOCK_SIZE) {
198 AES_ecb_encrypt(in, out, key, encrypt);
199 in += AES_BLOCK_SIZE;
200 out += AES_BLOCK_SIZE;
201 len -= AES_BLOCK_SIZE;
202 }
203}
204
205void
194AES_ofb128_encrypt(const unsigned char *in, unsigned char *out, size_t length, 206AES_ofb128_encrypt(const unsigned char *in, unsigned char *out, size_t length,
195 const AES_KEY *key, unsigned char *ivec, int *num) 207 const AES_KEY *key, unsigned char *ivec, int *num)
196{ 208{