11cb0ef41Sopenharmony_ci/*
21cb0ef41Sopenharmony_ci * Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved.
31cb0ef41Sopenharmony_ci *
41cb0ef41Sopenharmony_ci * Licensed under the Apache License 2.0 (the "License").  You may not use
51cb0ef41Sopenharmony_ci * this file except in compliance with the License.  You can obtain a copy
61cb0ef41Sopenharmony_ci * in the file LICENSE in the source distribution or at
71cb0ef41Sopenharmony_ci * https://www.openssl.org/source/license.html
81cb0ef41Sopenharmony_ci */
91cb0ef41Sopenharmony_ci
101cb0ef41Sopenharmony_ci/*
111cb0ef41Sopenharmony_ci * AES_encrypt is deprecated - but we need to use it to implement
121cb0ef41Sopenharmony_ci * AES_ofb128_encrypt
131cb0ef41Sopenharmony_ci */
141cb0ef41Sopenharmony_ci#include "internal/deprecated.h"
151cb0ef41Sopenharmony_ci
161cb0ef41Sopenharmony_ci#include <openssl/aes.h>
171cb0ef41Sopenharmony_ci#include <openssl/modes.h>
181cb0ef41Sopenharmony_ci
191cb0ef41Sopenharmony_civoid AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
201cb0ef41Sopenharmony_ci                        size_t length, const AES_KEY *key,
211cb0ef41Sopenharmony_ci                        unsigned char *ivec, int *num)
221cb0ef41Sopenharmony_ci{
231cb0ef41Sopenharmony_ci    CRYPTO_ofb128_encrypt(in, out, length, key, ivec, num,
241cb0ef41Sopenharmony_ci                          (block128_f) AES_encrypt);
251cb0ef41Sopenharmony_ci}
26