/[soft]/gpg/random-passphrase
ViewVC logotype

Annotation of /gpg/random-passphrase

Parent Directory Parent Directory | Revision Log Revision Log


Revision 383 - (hide annotations) (download)
Wed Feb 2 23:59:35 2011 UTC (14 years ago) by boklm
File size: 285 byte(s)
add script to generate random passphrase without \n and \r
1 boklm 383 #!/usr/bin/perl -w
2     use strict;
3    
4     my $size = 50;
5    
6     binmode(STDOUT, ":utf8");
7    
8     open(my $rf, '<', '/dev/random');
9     while ($size) {
10     my $o;
11     print STDERR "$size random bytes to read.\n";
12     read $rf, $o, 1;
13     if ($o ne "\n" && $o ne "\r") {
14     print $o;
15     $size--;
16     }
17     }
18     close($rf);
19    

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.30