mirror of
https://codeberg.org/scip/Crypt--PWSafe3.git
synced 2025-12-16 20:21:01 +01:00
Attempt to improve performance. Previous implementation happened to be very slow (on my laptop it took 5 minutes to read small pwsafe file and save it back). I profiled the code and it turned out, this cost was totally dominated by the Crypt::PWSafe3::random function (which on every call accesses system random seed). I replaced it with Bytes::Random::Secure which seeds using OS crypto but afterwards uses embedded generator. Performance improvement is drastical, the same read&save takes about half a second on the same laptop.
24 lines
665 B
Perl
24 lines
665 B
Perl
require 5.004;
|
|
use ExtUtils::MakeMaker;
|
|
|
|
WriteMakefile(
|
|
'NAME' => 'Crypt::PWSafe3',
|
|
'VERSION_FROM' => 'lib/Crypt/PWSafe3.pm',
|
|
'PREREQ_PM' => { 'Digest::HMAC' => 1.00,
|
|
'Digest::SHA' => 1.00,
|
|
'Crypt::CBC' => 2.30,
|
|
'Crypt::ECB' => 1.45,
|
|
'Crypt::Twofish' => 2.14,
|
|
'Crypt::Random' => 1.25,
|
|
'Data::UUID' => 1.217,
|
|
'Shell' => 0.5,
|
|
'Bytes::Random::Secure' => 0.09,
|
|
},
|
|
'AUTHOR' => 'Thomas Linden <tlinden@cpan.org>',
|
|
'clean' => {
|
|
FILES => 't/*.out *~ */*~ */*/*~ */*/*/*~'
|
|
},
|
|
|
|
);
|
|
|