   you want [[secretbox-open-easy]]."
   [^bytes out ^bytes ctext ^bytes nonce ^bytes key]
   (let [clen (long (buflen ctext))
-        res (.crypto_secretbox_open_easy sodium out ctext clen nonce key)]
+        res (.crypto_secretbox_open_easy b/sodium out ctext clen nonce key)]
     (if (= res 0)
       out
       (throw (RuntimeException. "Ciphertext verification failed")))))

(ns caesium.crypto.secretbox
  "Bindings to the secretbox secret-key authenticated encryption scheme."
  (:require [caesium.binding :refer [sodium defconsts]]
            [caesium.util :as u]
            [caesium.byte-bufs :refer [buflen]])
  (:import [java.nio ByteBuffer]))

(defconsts [keybytes noncebytes macbytes primitive])

(defn secretbox-easy-to-buf!
  "Encrypt with `crypto_secretbox_easy` into the given byte array.

  you want [[secretbox-easy]]."
  [^bytes out ^bytes msg ^bytes nonce ^bytes key]
  (let [mlen (buflen msg)]
    (.crypto_secretbox_easy b/sodium out msg mlen nonce key)))

(defn secretbox-easy-to-byte-buf!
  "Like [[secretbox-easy-to-buf!]], but with a ByteBuffer output.
