         kdfimpl (KDFCounterBytesGenerator. mac)]
     (.init kdfimpl params)
     (reify
-      KDFType
-      (generate-bytes! [_ length]
-        (generate-byte-array kdfimpl length)))))
+      IKDF
+      (generate-byte-array! [_ length]
+        (generate-byte-array kdfimpl length))
+
+      (generate-byte-buffer! [_ length]
+        (generate-byte-buffer kdfimpl length)))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Feedback mode KDF

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

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

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

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