;;;; entropy-unix.scm ;;;; Kon Lovett, Oct '09 (module entropy-unix (;export make-entropy-source-random-device make-entropy-source-urandom-device) (import scheme chicken entropy-source entropy-port) (require-library entropy-source entropy-port) ;;; Entropy from /dev/random (define (make-entropy-source-random-device) (make-entropy-source/file "/dev/random" 'random-device "Entropy from random device") ) (register-entropy-source! 'random-device make-entropy-source-random-device) ;;; Entropy from /dev/urandom (define (make-entropy-source-urandom-device) (make-entropy-source/file "/dev/urandom" 'urandom-device "Entropy from urandom device") ) (register-entropy-source! 'urandom-device make-entropy-source-urandom-device) ) ;module entropy-unix