anchor.diff:  
   ;; Generate hmac for file
   (-> (io/input-stream "/tmp/somefile")
  -    (hmac/hmac "mysecretkey" :sha256)
  -    (bytes->hex))
  -;; -> "4cb793e600848da2053238003fce4c010233c49df3e6a04119b4287eb464c27e"
  -----
  -
  -You can extend it for your own types using `buddy.core.mac.hmac/HMac` protocol:
  +    (hmac/hash "mysecretkey" :sha256)
  +    (codecs/bytes->hex))
  +;; => "4cb793e600848da2053238003fce4c010233c49df3e6a04119b4287eb464c27e"
  +----
  +
  +
  +==== Advanced usage
  +
  +You can extend it for your own types using `buddy.core.mac.hmac/IHMac` protocol, that looks
  +like that one:
   
   [source,clojure]
   ----
  -(defprotocol HMac
  -  (make-hmac [data key algorithm]))
  +(defprotocol IHMac
  +  (hash* [data key algorithm])
  +  (verify* [data signature key alg]))
  +----
  +
  +
  +=== SHMac (Salted)
  +
  +
  +This is a salted variant of hmac algorithm and is available in *buddy.core.mac.shmac*
  +namespace.
  +
  +
  +==== Usage example
  +
  +[source, clojure]
  +----
  +;; Import required namespaces
  +(require '[buddy.core.mac.hmac :as shmac])
  +(require '[buddy.core.codecs :as codecs])
  +
  +;; Generate sha256 shmac over string
  +(-> (shmac/hash "foo bar" "salt" "mysecretkey" :sha256)
  +    (codecs/bytes->hex))
  +;; => "bd5f7a0040430a73f4845bac8f980c6398b4baae8a22efcc22038be0f4dd9678"
   ----
   
   
  
positive.code: .Make mac using Serpent block cipher with random IV
  [source, clojure]
  ----
  (require '[buddy.core.codecs :refer [bytes->hex]])
  (require '[buddy.core.mac.poly1305 :as poly])
  (require '[buddy.core.keys :refer [make-random-bytes]])
  
  (let [iv  (make-random-bytes 16)
        mac (poly/poly1305 "some-data" "mysecret" iv :serpent)]
    (println (bytes->hex mac)))
  ;; => "1976b1c490c306e7304a59dfacee4207"
  ----
  
  == Public/Private keypairs
  
  
negative.code: .Example using hkdf
  [source, clojure]
  ----
  (require '[buddy.core.codecs :as codecs])
  (require '[buddy.core.kdf :as kdf])
  
  ;; Using hkdf derivation functions. It requires a
  ;; key, salt and optionally info field that can
  ;; contain any random data.
  
  (let [kfn (kdf/hkdf (codecs/str->bytes "mysecretkey")
                      (codecs/str->bytes "mypublicsalt")
                      nil ;; info parameter can be nil
                      :sha256)]
    (-> (kdf/generate-byte-array! kfn 8)
        (codecs/bytes->hex)))
  
  ;; => "0faba553152fce4f"
  ----
  
  
  