Back
update! (clj)
(source)function
(update! engine input)
(update! engine input offset)
(update! engine input offset length)
Examples
funcool/buddy-core
(ns buddy.core.hash-tests
(:require [clojure.test :refer :all]
[clojure.string :as str]
[buddy.core.codecs :as codecs :refer :all]
[buddy.core.bytes :as bytes]
[buddy.core.keys :refer :all]
[buddy.core.hash :as hash]
[clojure.java.io :as io]))
(testing "low-level api"
(let [engine (org.bouncycastle.crypto.digests.SHA1Digest.)]
(hash/update! engine (str->bytes ""))
(let [data (hash/end! engine)]
(is (= (bytes->hex data)
"da39a3ee5e6b4b0d3255bfef95601890afd80709"))))))