mirror of
git://git.psyced.org/git/psyced
synced 2024-08-15 03:25:10 +00:00
let the past begone in cvs land. welcome to igit igit!
This commit is contained in:
commit
4e601cf1c7
509 changed files with 77963 additions and 0 deletions
19
run/md5.pl
Normal file
19
run/md5.pl
Normal file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/perl
|
||||
#
|
||||
# these files demonstrate how to use external pipe processes
|
||||
# (sort of like cgi) with LDMUD. but by now LDMUD knows how
|
||||
# to do MD5 and SHA1 itself, so they are not being used.
|
||||
#
|
||||
use Digest::MD5 qw(md5 md5_hex);
|
||||
|
||||
$| = 1;
|
||||
|
||||
$md5 = Digest::MD5->new;
|
||||
|
||||
while(defined ($line = <STDIN>)) {
|
||||
chomp $line;
|
||||
$md5->add($line);
|
||||
print STDOUT $md5->hexdigest;
|
||||
}
|
||||
|
||||
1;
|
19
run/sha1.pl
Normal file
19
run/sha1.pl
Normal file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/perl
|
||||
#
|
||||
# these files demonstrate how to use external pipe processes
|
||||
# (sort of like cgi) with LDMUD. but by now LDMUD knows how
|
||||
# to do MD5 and SHA1 itself, so they are not being used.
|
||||
#
|
||||
use Digest::SHA1 qw(sha1 sha1_hex);
|
||||
|
||||
$| = 1;
|
||||
|
||||
$sha1 = Digest::SHA1->new;
|
||||
|
||||
while(defined ($line = <STDIN>)) {
|
||||
chomp $line;
|
||||
$sha1->add($line);
|
||||
print STDOUT $sha1->hexdigest;
|
||||
}
|
||||
|
||||
1;
|
Loading…
Add table
Add a link
Reference in a new issue