(defun make-aes256-cipher () (let ((key (ironclad::random-data 32 crypto:*prng*)) (IV (ironclad::random-data 16 crypto:*prng*))) (make-cipher :aes :key key :mode :ctr :initialization-vector IV))) (define-test test-make-aes256-cipher (:tags '(security) :contexts (list #'setup #'teardown)) (let* ((plaintext (trivial-utf-8:string-to-utf-8-bytes "testing")) (pl (length plaintext)) (ciphertext (make-array pl :element-type '(unsigned-byte 8))) (out (make-array pl :element-type '(unsigned-byte 8))) (cipher (make-aes256-cipher))) (assert-true (typep cipher 'ironclad::aes)) (ironclad::encrypt cipher plaintext ciphertext :handle-final-block t) (:printv plaintext) (:printv ciphertext) (:printv (ironclad::key-lengths cipher)) (ironclad::decrypt cipher ciphertext out :handle-final-block t) (:printv ciphertext) (:printv out) (assert-equal (trivial-utf-8:string-to-utf-8-bytes "testing") out) )) Plaintext bytes do not match decrypted bytes