Permalink
Browse files

Remove code that has been moved to MYSQL-UTILS

darcs-hash:20060827005809-782ad-370688f3145f69af0ddad8fcef27a1e3f52cd57c.gz
  • Loading branch information...
1 parent 11b1bae commit b7ee27f094b5d7686ae358c79f16a2922f5f536b Eric Knauel committed Aug 27, 2006
Showing with 6 additions and 14 deletions.
  1. +1 −0 packages.scm
  2. +5 −14 sha1.scm
View
@@ -79,5 +79,6 @@
(define-structure sha1 sha1-interface
(open scheme
bitwise byte-vectors ascii
+ mysql-utils
srfi-28)
(files sha1))
View
@@ -157,15 +157,6 @@
(else
(bitwise-xor (bitwise-xor x y) z))))
-;;; code to add numbers modulo 2^32
-(define ring-size (expt 2 32))
-
-(define (mod2+ a b)
- (modulo (+ a b) ring-size))
-
-(define (mod+ a b c d e)
- (mod2+ (mod2+ (mod2+ (mod2+ a b) c) d) e))
-
;;; the SHA1 "constants"
(define (sha1-constant i)
(cond
@@ -200,11 +191,11 @@
(if (= i 80)
(values a b c d e)
(lp (+ i 1)
- (mod+ (circular-shift-left a 5)
- (nonlinear-sha1-function i b c d)
- e
- (vector-ref extended-words i)
- (sha1-constant i))
+ (mod5+ (circular-shift-left a 5)
+ (nonlinear-sha1-function i b c d)
+ e
+ (vector-ref extended-words i)
+ (sha1-constant i))
a
(circular-shift-left b 30)
c

0 comments on commit b7ee27f

Please sign in to comment.