    (instance? IFn engine) (engine)
    (instance? BlockCipher engine) engine))
 
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Internal implementations
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defn key->poly1305key
+(defn- key->poly1305key
   "Noramalizes any length byte array key to poly1305
   formatted byte array key.
 

           clojure.lang.Keyword
           buddy.Arrays))


(def ^{:doc "Default engine factories."
       :dynamic true}

                       :serpent #(SerpentEngine.)
                       :twofish #(TwofishEngine.)})

(defn- resolve-engine
  "Given dynamic type engine, try resolve it to
  valid engine instance. By default accepts keywords
  and functions."
