#!/bin/csh # # scrypto # some shell based crypto by Michael L. Love (GPL) # Wed Sep 5 14:42:02 EDT 2007 # date --version > /dev/null if ( $? != 0 ) then echo this only works with GNU date exit endif echo please wait, acquiring seed... setenv TIME `date +%N | cut -b1-6` sleep `echo ${1}'*3' | sed s/^/'scale=22\n'/ | bc` setenv TIME $TIME`date +%N | cut -b1-6` sleep `echo ${1}'*3' | sed s/^/'scale=22\n'/ | bc` setenv TIME $TIME`date +%N | cut -b1-6` sleep `echo ${1}'*3' | sed s/^/'scale=22\n'/ | bc` echo $TIME setenv SEED `echo ${TIME}'/999999999999999999' |\ sed s/^/'scale='${1}'\n'/| bc | sed s/'\\'//g | tr -d '\n'` echo the seed is $SEED setenv ARRAY ${1} setenv WIDTH `echo 'sqrt ('${1}')' | sed s/^/'scale=22\n'/ | bc | sed s/'\\'//g | tr -d '\n' | cut -f1 -d'.'` setenv SEEDARRAY `echo ${SEED}'*'${1} | sed s/^/'scale=22\n'/ | bc | sed s/'\\'//g | tr -d '\n' | cut -f1 -d'.'` setenv SEEDWIDTH `echo ${SEED}'*'${WIDTH} | sed s/^/'scale=22\n'/ | bc | sed s/'\\'//g | tr -d '\n' | cut -f1 -d'.'` echo the array size is $ARRAY echo the width size is $WIDTH echo the seed array size is $SEEDARRAY echo the seed width size is $SEEDWIDTH seq 1 ${1} | rs | rs ${SEEDARRAY} | tac |\ rs | rs -t 213 \ rs | rs -t ${WIDTH} | tac |\ rs | rs 101 \ rs | rs -t ${SEEDWIDTH} | tac |\ rs | rs 51 | tac |\ rs | rs -t 6 \ rs | rs -t 9 \ rs | rs -t 8 \ rs | rs -t 5 \ rs | rs 4 \ rs | rs -t 7 \ rs | rs -t 5 \ rs | rs -t 3 \ rs | rs 2 \ rs | rs -t 1 \ rs | rs -t 3 \ rs | rs -t 2 \ rs | rs -t 4 \ rs | rs -t 1 \ rs