 (defmulti decrypt* :algorithm)
 
 (defmethod encrypt* :aes128-cbc-hmac-sha256
-  [{:keys [algorithm input key iv ] :as params}]
+  [{:keys [algorithm input key iv aad] :as params}]
   {:pre [(keylength? key 32) (ivlength? iv 16)]}
   (let [cipher (block-cipher :aes :cbc)
         encryptionkey (extract-encryption-key key algorithm)

    :aes256-cbc-hmac-sha512 (bytes/slice key 0 32)))

(defn- generate-authtag
  [{:keys [algorithm input authkey iv] :as params}]
  (let [data (bytes/concat iv input)
        fulltag (hmac/hash data authkey algorithm)
        truncatesize (quot (count fulltag) 2)]
    (bytes/slice fulltag 0 truncatesize)))

           org.bouncycastle.crypto.BlockCipher
           org.bouncycastle.crypto.StreamCipher
           org.bouncycastle.crypto.InvalidCipherTextException
           java.nio.ByteBuffer
           clojure.lang.IFn
           clojure.lang.Keyword))

