           ;; failure on my part
           (b-t/byte-copy! (get-in state [::current-client ::shared/extension])
                              extension)
-          (let [packet-type-id (char (aget header (dec shared/header-length)))]
+          (let [packet-type-id (char (aget header (dec K/header-length)))]
             (try
               (case packet-type-id
                 \H (handle-hello! state packet)

              ;; Important note: I'm deliberately not releasing this, because I'm sending it back.
              (.clear message)
              (let [packet
                    (build-cookie-packet! message clnt-xtn srvr-xtn working-nonce text)]
                (log/info "Cookie packet built. Returning it.\n"
                          (with-out-str (bs/print-bytes packet)))
                (try
                  (let [dst (get-in state [::client-write-chan :chan])
                        success (stream/try-put! dst

      (b-t/byte-copy! working-nonce 0 shared/server-nonce-prefix-length K/cookie-nonce-prefix)
      (let [cookie (crypto/box-after client-short<->server-long text 128 working-nonce)]
        (log/info (str "Cookie going to client:\n"
                       (with-out-str (b-s/print-bytes cookie))))
        cookie))))

(defn build-cookie-packet
  [packet client-extension server-extension working-nonce text]
  (shared/compose K/cookie-frame {::shared/header K/cookie-header
                                  ::shared/client-extension client-extension
                                  ::shared/server-extension server-extension
                                  ::shared/nonce (Unpooled/wrappedBuffer working-nonce
                                                                         shared/server-nonce-prefix-length
                                                                         K/server-nonce-suffix-length)
                                  ;; This is also a great big FAIL:
                                  ;; Have to drop the first 16 bytes
                                  ;; Q: Have I fixed that yet?
                                  ::shared/cookie (Unpooled/wrappedBuffer text
                                                                          K/box-zero-bytes
                                                                          144)}
                  packet))

(defn open-hello-crypto-box
