crypto/builtin: Split and simplify AES_encrypt_cbc
commitef186f4bc24ea7159a57776e8add1e9478b9702e
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 28 Aug 2020 17:05:20 +0000 (28 10:05 -0700)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 10 Sep 2020 10:02:23 +0000 (10 11:02 +0100)
treeb11c2c56c5d7d789962fa05bb081d208f30410cb
parenta2d76b6b2e324972641749f9fffd9eab27c89509
crypto/builtin: Split and simplify AES_encrypt_cbc

Split into encrypt/decrypt functions, dropping the "enc" argument.
Now that the function is private to this file, we know that "len"
is a multiple of AES_BLOCK_SIZE.  So drop the odd block size code.

Name the functions do_aes_*crypt_cbc to match the *_ecb functions.
Reorder and re-type the arguments to match as well.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
crypto/cipher-builtin.c.inc