mirror of
https://codeberg.org/scip/Crypt--PWSafe3.git
synced 2025-12-16 20:21:01 +01:00
fixed rt.cpan.org#112975
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2011-2015 T.v.Dein <tlinden |AT| cpan.org>.
|
# Copyright (c) 2011-2016 T.v.Dein <tlinden |AT| cpan.org>.
|
||||||
#
|
#
|
||||||
# Licensed under the terms of the Artistic License 2.0
|
# Licensed under the terms of the Artistic License 2.0
|
||||||
# see: http://www.perlfoundation.org/artistic_license_2_0
|
# see: http://www.perlfoundation.org/artistic_license_2_0
|
||||||
@@ -178,6 +178,7 @@ sub create {
|
|||||||
|
|
||||||
# encrypt b1 .. b4
|
# encrypt b1 .. b4
|
||||||
my $crypt = Crypt::ECB->new;
|
my $crypt = Crypt::ECB->new;
|
||||||
|
$crypt->padding('none');
|
||||||
$crypt->cipher('Twofish');
|
$crypt->cipher('Twofish');
|
||||||
$crypt->key( $this->strechedpw() );
|
$crypt->key( $this->strechedpw() );
|
||||||
$this->b1( $crypt->encrypt( $this->random(16) ) );
|
$this->b1( $crypt->encrypt( $this->random(16) ) );
|
||||||
@@ -245,6 +246,7 @@ sub read {
|
|||||||
$this->b4( $this->readbytes(16) );
|
$this->b4( $this->readbytes(16) );
|
||||||
|
|
||||||
my $crypt = Crypt::ECB->new;
|
my $crypt = Crypt::ECB->new;
|
||||||
|
$crypt->padding('none');
|
||||||
$crypt->cipher('Twofish') || die $crypt->errstring;
|
$crypt->cipher('Twofish') || die $crypt->errstring;
|
||||||
$crypt->key( $this->strechedpw() );
|
$crypt->key( $this->strechedpw() );
|
||||||
|
|
||||||
@@ -393,6 +395,7 @@ sub save {
|
|||||||
$this->writebytes($this->b4);
|
$this->writebytes($this->b4);
|
||||||
|
|
||||||
my $crypt = Crypt::ECB->new;
|
my $crypt = Crypt::ECB->new;
|
||||||
|
$crypt->padding('none');
|
||||||
$crypt->cipher('Twofish');
|
$crypt->cipher('Twofish');
|
||||||
$crypt->key( $this->strechedpw() );
|
$crypt->key( $this->strechedpw() );
|
||||||
|
|
||||||
@@ -994,7 +997,7 @@ in this module are his ideas ported to perl.
|
|||||||
|
|
||||||
=head1 COPYRIGHT
|
=head1 COPYRIGHT
|
||||||
|
|
||||||
Copyright (c) 2011-2015 by T.v.Dein <tlinden@cpan.org>.
|
Copyright (c) 2011-2016 by T.v.Dein <tlinden@cpan.org>.
|
||||||
|
|
||||||
=head1 LICENSE
|
=head1 LICENSE
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user