   ([pk sm]
    (let [smlen (buflen sm)
          m (byte-array (- smlen bytes))
-         res (.crypto_sign_open sodium m nil sm smlen pk)]
+         res (.crypto_sign_open b/sodium m nil sm smlen pk)]
      (if (zero? res)
        m
        (throw (RuntimeException. "Signature validation failed")))))
   ([pk msg sig]
    (let [mlen (buflen msg)
-         res (.crypto_sign_verify_detached sodium sig msg mlen pk)]
+         res (.crypto_sign_verify_detached b/sodium sig msg mlen pk)]
      (when-not (zero? res)
        (throw (RuntimeException. "Signature validation failed"))))))

  "Puts a signed version of the given message using given secret key into the
  given out buffer."
  [out sk m]
  (.crypto_sign sodium out nil m (buflen m) sk)
  out)

(defn signed

(ns caesium.crypto.sign
  (:refer-clojure :exclude [bytes])
  (:require [caesium.binding :as b]
            [caesium.byte-bufs :refer [buflen]]))

(b/defconsts [bytes seedbytes publickeybytes secretkeybytes primitive])

(defn keypair!
  "Generate a public-key and secret-key for signing with
