mirror of
https://codeberg.org/scip/Crypt--PWSafe3.git
synced 2025-12-16 12:11:02 +01:00
address issue#10: in Crypt::Random mode, use integer output directly, use correct size
This commit is contained in:
@@ -58,9 +58,8 @@ BEGIN {
|
||||
}
|
||||
else {
|
||||
*Crypt::PWSafe3::random = sub {
|
||||
my($this, $len) = @_;
|
||||
my $bits = makerandom(Size => 256, Strength => 1);
|
||||
return substr($bits, 0, $len);
|
||||
my($this, $len) = @_;
|
||||
return makerandom(Size => $len * 8, Strength => 1, Uniform => 1);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user