   (valAt [this k not-found]
     (case k
       :code code
-      :algorithm (code->name code)
+      :algorithm (:name (get-algorithm code))
       :length (/ (count digest) 2)
       :digest digest
       :bytes (hex->bytes digest)

  code or a keyword name as the first argument. The digest may either by a byte
  array or a hex string."
  [algorithm digest]
  (let [code (coerce-code algorithm)
        digest (if (string? digest)
                 (bytes->hex (hex->bytes digest))
                 (bytes->hex digest))]
    ; TODO: check length
    (Multihash. code digest nil)))



  Object

  (toString [this]
    (str "hash:" (name (:name (get-algorithm code))) \: digest))

  (equals [this that]
    (cond
