     (.init kdfimpl params)
     (reify
       IKDF
-      (generate-byte-array! [_ length]
-        (generate-byte-array kdfimpl length))
+      (generate-byte-array [_ length]
+        (generate-byte-array* kdfimpl length))
 
-      (generate-byte-buffer! [_ length]
-        (generate-byte-buffer kdfimpl length)))))
+      (generate-byte-buffer [_ length]
+        (generate-byte-buffer* kdfimpl length)))))

  untile next version for backward compatibility."
  [impl ^long length]
  (generate-byte-array! impl length))

(defn- generate-byte-array
  [impl length]
  (let [buffer (byte-array length)]
    (.generateBytes impl buffer 0 length)
    buffer))

(defn- generate-byte-buffer
  [impl length]
  (let [buffer (generate-byte-array impl length)]
    (ByteBuffer/wrap buffer)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; HKDF interface

    (.init kdfimpl params)
    (reify
      IKDF
      (generate-byte-array [_ length]
        (generate-byte-array* kdfimpl length))

      (generate-byte-buffer [_ length]
        (generate-byte-buffer* kdfimpl length)))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; KDF1/2 interface
