From 4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 27 Mar 2012 11:51:08 +0200 Subject: reorganize file structure to match the upstream requirements --- pintos-progos/tests/random.pm | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 pintos-progos/tests/random.pm (limited to 'pintos-progos/tests/random.pm') diff --git a/pintos-progos/tests/random.pm b/pintos-progos/tests/random.pm deleted file mode 100644 index be008ff..0000000 --- a/pintos-progos/tests/random.pm +++ /dev/null @@ -1,27 +0,0 @@ -use strict; -use warnings; - -use tests::arc4; - -my (@arc4); - -sub random_init { - if (@arc4 == 0) { - my ($seed) = @_; - $seed = 0 if !defined $seed; - @arc4 = arc4_init (pack ("V", $seed)); - } -} - -sub random_bytes { - random_init (); - my ($n) = @_; - return arc4_crypt (\@arc4, "\0" x $n); -} - -sub random_ulong { - random_init (); - return unpack ("V", random_bytes (4)); -} - -1; -- cgit v1.2.3