;; Nujel - Copyright (C) 2020-2021 - Benjamin Vincent Schulenburg
;; This project uses the MIT license, a copy should be included under /LICENSE
;;
;; Contains various implementations for various hashing functions
[defn hash/adler32 [data]
[def a 1]
[def b 0]
[dotimes [i [string/length data]]
[set! a [mod/int [add/int a [char-at data i]] 65521]]
[set! b [mod/int [add/int a b] 65521]]]
[logior a [ash b 16]]]