Login
7 branches 0 tags
Ben (X13/Void) Code cleanup, mostly removing unnecessary includes bf7a2f7 3 years ago 493 Commits
nujel / stdlib / hash / hash.nuj
; Contains various implementations for various hashing functions

[defun hash/adler32 [data]
       [def a 1]
       [def b 0]
       [for [i 0 [string/length data]]
            [set! a [mod [add a [char-at data i]] 65521]]
            [set! b [mod [add a b] 65521]]]
       [logior a [ash b 16]]]