Alt-Crypt-RSA-BigInt
view release on metacpan or search on metacpan
.travis.yml view on Meta::CPAN
before_script:
#- cpanm Test::Pod # optional dependency
#
# These should all be handled by the standard dependency setup
#
#- cpanm Data::Buffer
#- cpanm Class::Loader
#- cpanm Sort::Versions
#- cpanm Convert::ASCII::Armour
#- cpanm Tie::EncryptedHash
#- cpanm Data::Dumper
#- cpanm Digest::MD2
#- cpanm Digest::MD5
#- cpanm Digest::SHA
#- cpanm Crypt::Blowfish
#- cpanm Crypt::CBC
#- cpanm Math::BigInt::GMP
#- cpanm Math::Prime::Util::GMP
#- cpanm Math::Prime::Util
install:
}
},
"runtime" : {
"requires" : {
"Carp" : "0",
"Class::Loader" : "0",
"Convert::ASCII::Armour" : "0",
"Crypt::Blowfish" : "0",
"Crypt::CBC" : "2.17",
"Data::Buffer" : "0",
"Data::Dumper" : "0",
"Digest::MD2" : "0",
"Digest::MD5" : "0",
"Digest::SHA" : "0",
"Exporter" : "0",
"Math::BigInt" : "1.78",
"Math::BigInt::GMP" : "0",
"Math::Prime::Util" : "0.64",
"Math::Prime::Util::GMP" : "0",
"Sort::Versions" : "0",
"Tie::EncryptedHash" : "0",
- t
- inc
- lib/Crypt
requires:
Carp: '0'
Class::Loader: '0'
Convert::ASCII::Armour: '0'
Crypt::Blowfish: '0'
Crypt::CBC: '2.17'
Data::Buffer: '0'
Data::Dumper: '0'
Digest::MD2: '0'
Digest::MD5: '0'
Digest::SHA: '0'
Exporter: '0'
Math::BigInt: '1.78'
Math::BigInt::GMP: '0'
Math::Prime::Util: '0.64'
Math::Prime::Util::GMP: '0'
Sort::Versions: '0'
Tie::EncryptedHash: '0'
Makefile.PL view on Meta::CPAN
'Benchmark' => 0,
'MIME::Base64' => 0,
},
PREREQ_PM => {
'Math::BigInt' => '1.78', # try => backend
'Math::Prime::Util' => '0.64', # built in csprng
'Carp' => 0,
'Exporter' => 0,
'Crypt::CBC' => '2.17',
'Crypt::Blowfish' => 0,
'Data::Dumper' => 0,
'Tie::EncryptedHash' => 0,
'Convert::ASCII::Armour' => 0,
'Sort::Versions' => 0,
'Digest::SHA' => 0,
'Digest::MD5' => 0,
'Digest::MD2' => 0,
'Class::Loader' => 0,
'Data::Buffer' => 0,
%bigint_preq,
},
lib/Crypt/RSA/Key/Private.pm view on Meta::CPAN
## Crypt::RSA::Key::Private
##
## Copyright (c) 2001, Vipul Ved Prakash. All rights reserved.
## This code is free software; you can redistribute it and/or modify
## it under the same terms as Perl itself.
use vars qw($AUTOLOAD $VERSION);
use base 'Crypt::RSA::Errorhandler';
use Tie::EncryptedHash;
use Data::Dumper;
use Math::BigInt try => 'GMP, Pari';
use Math::Prime::Util qw/is_prime/;
use Carp;
$Crypt::RSA::Key::Private::VERSION = '1.99';
sub new {
my ($class, %params) = @_;
my $self = { Version => $Crypt::RSA::Key::Private::VERSION };
lib/Crypt/RSA/Key/Private.pm view on Meta::CPAN
don't specify a password at C<new()>.
=item B<read()>
Causes the key to be read from a disk file specified by
C<Filename> into the object. If C<Password> is provided, the
method automatically calls reveal() to decrypt the key.
=item B<serialize()>
Creates a Data::Dumper(3) serialization of the private key and
returns the string representation.
=item B<deserialize()>
Accepts a serialized key under the C<String> parameter and
coverts it into the perl representation stored in the object.
=item C<check()>
Check the consistency of the key. If the key checks out, it sets
lib/Crypt/RSA/Key/Public.pm view on Meta::CPAN
use warnings;
## Crypt::RSA::Key::Public
##
## Copyright (c) 2001, Vipul Ved Prakash. All rights reserved.
## This code is free software; you can redistribute it and/or modify
## it under the same terms as Perl itself.
use vars qw($AUTOLOAD);
use Carp;
use Data::Dumper;
use base 'Crypt::RSA::Errorhandler';
use Math::BigInt try => 'GMP, Pari';
$Crypt::RSA::Key::Public::VERSION = '1.99';
sub new {
my ($class, %params) = @_;
my $self = { Version => $Crypt::RSA::Key::Public::VERSION };
if ($params{Filename}) {
lib/Crypt/RSA/Key/Public.pm view on Meta::CPAN
Causes the key to be written to a disk file specified by the
C<Filename> argument.
=item B<read()>
Causes the key to be read from a disk file specified by
C<Filename> into the object.
=item B<serialize()>
Creates a Data::Dumper(3) serialization of the private key and
returns the string representation.
=item B<deserialize()>
Accepts a serialized key under the C<String> parameter and
coverts it into the perl representation stored in the object.
=item C<check()>
Check the consistency of the key. Returns undef on failure.
t/04-octet_xor.t view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
## Copyright (c) 2000, Vipul Ved Prakash. All rights reserved.
## This code is free software; you can redistribute it and/or modify
## it under the same terms as Perl itself.
use Test::More;
use Crypt::RSA::DataFormat qw(octet_xor);
use Data::Dumper;
plan tests => 2;
my $a = "abcdefghijklmnopqrstuvwxyz";
my $b = "ABCDEFGHIJ";
my $d = octet_xor ($a, $b);
my $e = octet_xor ($d, $b);
my $f = octet_xor ($d, $a);
$f =~ s/^\0+//;
t/17-public-ssh.t view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use Crypt::RSA::Key;
use Data::Dumper;
plan tests => 3;
# Danaj: This is definitely not the interface I would have chosen. It would
# seem like you'd like to be able to hand the string to generate.
# Why do I have to make a full new object to deserialize?
my $obj = new Crypt::RSA::Key;
my ($pub, $pri) = $obj->generate(
t/18-private-ssh.t view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use Crypt::RSA::Key;
use Data::Dumper;
plan tests => 1*2;
# Danaj: This is definitely not the interface I would have chosen. It would
# seem like you'd like to be able to hand the string to generate.
# Why do I have to make a full new object to deserialize?
my $obj = new Crypt::RSA::Key;
my ($pub, $pri) = $obj->generate(
( run in 0.290 second using v1.01-cache-2.11-cpan-4d50c553e7e )