clean up extra crypto a bit
parent
34fe576919
commit
9b8fdfc154
|
@ -8,5 +8,3 @@ IN: crypto.barrett
|
|||
#! size = word size in bits (8, 16, 32, 64, ...)
|
||||
[ [ log2 1+ ] [ / 2 * ] bi* ]
|
||||
[ 2^ rot ^ swap /i ] 2bi ;
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
! Copyright (C) 2008 Doug Coleman.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: arrays combinators checksums checksums.md5
|
||||
checksums.sha1 checksums.md5.private io io.binary io.files
|
||||
io.streams.byte-array kernel math math.vectors memoize sequences
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
! Copyright (C) 2008 Doug Coleman.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: kernel math threads system calendar ;
|
||||
IN: crypto.timing
|
||||
|
||||
|
|
|
@ -8,5 +8,5 @@ IN: crypto.xor
|
|||
ERROR: empty-xor-key ;
|
||||
|
||||
: xor-crypt ( seq key -- seq' )
|
||||
dup empty? [ empty-xor-key ] when
|
||||
[ empty-xor-key ] when-empty
|
||||
[ dup length ] dip '[ _ mod-nth bitxor ] 2map ;
|
||||
|
|
Loading…
Reference in New Issue