clean up extra crypto a bit

db4
Doug Coleman 2008-12-06 23:01:17 -06:00
parent 34fe576919
commit 9b8fdfc154
4 changed files with 5 additions and 3 deletions

View File

@ -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 ;

View File

@ -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

View File

@ -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

View File

@ -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 ;