I know I’m going to forget this command line, so I’m documenting it here.
To use AES with a 128 bit key in CBC (cipher block chaining) mode to encrypt the file plaintext with key key and initialization vector iv, saving the result in the file ciphertext:
openssl aes-128-cbc -K key -iv iv -e -in plaintext -out ciphertext
To decrypt, change that -e to -d.
Warning: the values of the key and the iv must be typed in hex.