Codebase list libcryptx-perl / 117bc3b
fix issue #24 Crypt::PK::ECC needs $VERSION (all *.pm have $VERSION) Karel Miko 7 years ago
84 changed file(s) with 145 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
1111 - maybe: x509_rsa_pubkey + x509_rsa_pubkey_alg
1212
1313 0.041 2016/XX/XX
14 - ltc_ecc_is_point memory leak
14 - ECC: ltc_ecc_is_point memory leak
15 - DSA: properly handle FIPS 186-4 (4.6 + 4.7)
16 - fix issue #24 Crypt::PK::ECC needs $VERSION (all *.pm have $VERSION)
1517
1618 0.040 2016/09/12
1719 - fix file permissions
3838 # ARFLAGS=\$(AR_STATIC_ARGS) RANLIB=\$(RANLIB) AR=\$(AR)
3939
4040 sub MY::postamble {
41 return qq{
41 my $myextlib = qq{
42 \$(MYEXTLIB): src/Makefile
43 cd src && \$(MAKE) ARFLAGS="\$(AR_STATIC_ARGS)" RANLIB="\$(RANLIB)" AR="\$(AR)" CC="\$(CC)" LIB_EXT=\$(LIB_EXT) OBJ_EXT=\$(OBJ_EXT) CFLAGS="$mycflags"
44 };
45
46 $myextlib = qq{
4247 \$(MYEXTLIB): src/Makefile
4348 cd src && \$(MAKE) -f Makefile.nmake CFLAGS="$mycflags"
4449 } if $^O eq 'MSWin32' && $Config{make} =~ /nmake/ && $Config{cc} =~ /cl/;
45 return qq{
50
51 $myextlib = qq{
4652 \$(MYEXTLIB): src/Makefile
4753 cd src && \$(MAKE) CC="$Config{cc}" CFLAGS="$mycflags"
4854 } if $^O eq 'MSWin32' && $Config{cc} =~ /gcc/;
49 return qq{
50 \$(MYEXTLIB): src/Makefile
51 cd src && \$(MAKE) ARFLAGS="\$(AR_STATIC_ARGS)" RANLIB="\$(RANLIB)" AR="\$(AR)" CC="\$(CC)" LIB_EXT=\$(LIB_EXT) OBJ_EXT=\$(OBJ_EXT) CFLAGS="$mycflags"
55
56 my $version_patch = q{
57 versionsync:
58 $(NOECHO) perl _generators/version_patch.pl sync
59
60 versioninc:
61 $(NOECHO) perl _generators/version_patch.pl inc
62
63 versionincdev:
64 $(NOECHO) perl _generators/version_patch.pl incdev
65
66 versiondec:
67 $(NOECHO) perl _generators/version_patch.pl dec
68
69 versiondecdev:
70 $(NOECHO) perl _generators/version_patch.pl decdev
5271 };
72
73 return "$myextlib\n$version_patch";
5374 }
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.001';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.001';
67
78 use base qw(Crypt::Digest Exporter);
89 our %EXPORT_TAGS = ( all => [qw( [%lc_name%] [%lc_name%]_hex [%lc_name%]_b64 [%lc_name%]_b64u [%lc_name%]_file [%lc_name%]_file_hex [%lc_name%]_file_b64 [%lc_name%]_file_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.001';
67
78 use base qw(Crypt::Mac Exporter);
89 our %EXPORT_TAGS = ( all => [qw( [%lc_name%] [%lc_name%]_hex [%lc_name%]_b64 [%lc_name%]_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.001';
67
78 use Crypt::Cipher;
89 use base 'Crypt::Mode';
0 use 5.014;
1 use strict;
2 use warnings;
3
4 use File::Find qw(find);
5 use File::Slurp qw(read_file write_file);
6
7 die "bad arg\n" unless $ARGV[0] && $ARGV[0] =~ /^(inc|dec|incdev|decdev|sync)$/;
8
9 my $crx = read_file('lib/CryptX.pm');
10 my ($ver) = $crx =~ /\nour \$VERSION = '([0-9_.]+)';/;
11 die "invalid current version '$ver'" unless $ver =~ /^(\d+\.\d+|\d+\.\d+_\d+)$/ && $ver !~ /_0*$/;
12
13 if ($ARGV[0] ne 'sync') {
14 $ver =~ s/_//;
15 $ver = sprintf("%.3f", $ver + 0.001) if $ARGV[0] eq 'inc';
16 $ver = sprintf("%.3f", $ver - 0.001) if $ARGV[0] eq 'dec';
17 $ver = sprintf("%.6f", $ver + 0.000001) =~ s/(...)$/_$1/r if $ARGV[0] eq 'incdev';
18 $ver = sprintf("%.6f", $ver - 0.000001) =~ s/(...)$/_$1/r if $ARGV[0] eq 'decdev';
19 die "invalid next version '$ver'" unless $ver =~ /^(\d+\.\d+|\d+\.\d+_\d+)$/ && $ver !~ /_0*$/;
20 }
21
22 my @files;
23 find({ wanted=>sub { push @files, $_ if /\.pm$/ }, no_chdir=>1 }, 'lib');
24
25 for my $f (@files) {
26 next if $ARGV[0] eq 'sync' && $f eq 'lib/CryptX.pm';
27 my $txt = read_file($f, {binmode=>':unix'});
28 #$txt =~ s/\nuse warnings;/\nuse warnings;\nour \$VERSION = '$ver';/;
29 $txt =~ s/\nour \$VERSION = '([0-9_.]+)';/\nour \$VERSION = '$ver';/;
30 die "incorrect '$f'\n" unless $txt =~ /\nour \$VERSION = '$ver';/s;
31 write_file($f, {binmode=>':unix'}, $txt);
32 }
33
34
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 use base qw(Crypt::AuthEnc Exporter);
67 our %EXPORT_TAGS = ( all => [qw( ccm_encrypt_authenticate ccm_decrypt_verify )] );
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 use base qw(Crypt::AuthEnc Exporter);
67 our %EXPORT_TAGS = ( all => [qw( eax_encrypt_authenticate eax_decrypt_verify )] );
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 use base qw(Crypt::AuthEnc Exporter);
67 our %EXPORT_TAGS = ( all => [qw( gcm_encrypt_authenticate gcm_decrypt_verify )] );
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 use base qw(Crypt::AuthEnc Exporter);
67 our %EXPORT_TAGS = ( all => [qw( ocb_encrypt_authenticate ocb_decrypt_verify )] );
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 sub CLONE_SKIP { 1 } # prevent cloning
67
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45 use Carp;
56 use CryptX;
67
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45 use Carp;
56 use CryptX;
67
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 require Exporter; our @ISA = qw(Exporter); ### use Exporter 'import';
67 our %EXPORT_TAGS = ( all => [qw/
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use CryptX;
89 use base 'Crypt::Cipher';
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45 use CryptX;
56
67 ### the following methods/functions are implemented in XS:
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Digest Exporter);
89 our %EXPORT_TAGS = ( all => [qw( chaes chaes_hex chaes_b64 chaes_b64u chaes_file chaes_file_hex chaes_file_b64 chaes_file_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Digest Exporter);
89 our %EXPORT_TAGS = ( all => [qw( md2 md2_hex md2_b64 md2_b64u md2_file md2_file_hex md2_file_b64 md2_file_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Digest Exporter);
89 our %EXPORT_TAGS = ( all => [qw( md4 md4_hex md4_b64 md4_b64u md4_file md4_file_hex md4_file_b64 md4_file_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Digest Exporter);
89 our %EXPORT_TAGS = ( all => [qw( md5 md5_hex md5_b64 md5_b64u md5_file md5_file_hex md5_file_b64 md5_file_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Digest Exporter);
89 our %EXPORT_TAGS = ( all => [qw( ripemd128 ripemd128_hex ripemd128_b64 ripemd128_b64u ripemd128_file ripemd128_file_hex ripemd128_file_b64 ripemd128_file_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Digest Exporter);
89 our %EXPORT_TAGS = ( all => [qw( ripemd160 ripemd160_hex ripemd160_b64 ripemd160_b64u ripemd160_file ripemd160_file_hex ripemd160_file_b64 ripemd160_file_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Digest Exporter);
89 our %EXPORT_TAGS = ( all => [qw( ripemd256 ripemd256_hex ripemd256_b64 ripemd256_b64u ripemd256_file ripemd256_file_hex ripemd256_file_b64 ripemd256_file_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Digest Exporter);
89 our %EXPORT_TAGS = ( all => [qw( ripemd320 ripemd320_hex ripemd320_b64 ripemd320_b64u ripemd320_file ripemd320_file_hex ripemd320_file_b64 ripemd320_file_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Digest Exporter);
89 our %EXPORT_TAGS = ( all => [qw( sha1 sha1_hex sha1_b64 sha1_b64u sha1_file sha1_file_hex sha1_file_b64 sha1_file_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Digest Exporter);
89 our %EXPORT_TAGS = ( all => [qw( sha224 sha224_hex sha224_b64 sha224_b64u sha224_file sha224_file_hex sha224_file_b64 sha224_file_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Digest Exporter);
89 our %EXPORT_TAGS = ( all => [qw( sha256 sha256_hex sha256_b64 sha256_b64u sha256_file sha256_file_hex sha256_file_b64 sha256_file_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Digest Exporter);
89 our %EXPORT_TAGS = ( all => [qw( sha384 sha384_hex sha384_b64 sha384_b64u sha384_file sha384_file_hex sha384_file_b64 sha384_file_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Digest Exporter);
89 our %EXPORT_TAGS = ( all => [qw( sha512 sha512_hex sha512_b64 sha512_b64u sha512_file sha512_file_hex sha512_file_b64 sha512_file_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Digest Exporter);
89 our %EXPORT_TAGS = ( all => [qw( sha512_224 sha512_224_hex sha512_224_b64 sha512_224_b64u sha512_224_file sha512_224_file_hex sha512_224_file_b64 sha512_224_file_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Digest Exporter);
89 our %EXPORT_TAGS = ( all => [qw( sha512_256 sha512_256_hex sha512_256_b64 sha512_256_b64u sha512_256_file sha512_256_file_hex sha512_256_file_b64 sha512_256_file_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Digest Exporter);
89 our %EXPORT_TAGS = ( all => [qw( tiger192 tiger192_hex tiger192_b64 tiger192_b64u tiger192_file tiger192_file_hex tiger192_file_b64 tiger192_file_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Digest Exporter);
89 our %EXPORT_TAGS = ( all => [qw( whirlpool whirlpool_hex whirlpool_b64 whirlpool_b64u whirlpool_file whirlpool_file_hex whirlpool_file_b64 whirlpool_file_b64u )] );
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 require Exporter; our @ISA = qw(Exporter); ### use Exporter 'import';
67 our %EXPORT_TAGS = ( all => [qw( digest_data digest_data_hex digest_data_b64 digest_data_b64u digest_file digest_file_hex digest_file_b64 digest_file_b64u )] );
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 require Exporter; our @ISA = qw(Exporter); ### use Exporter 'import';
67 our %EXPORT_TAGS = ( all => [qw(pbkdf1 pbkdf2 hkdf hkdf_expand hkdf_extract)] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Mac Exporter);
89 our %EXPORT_TAGS = ( all => [qw( f9 f9_hex f9_b64 f9_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Mac Exporter);
89 our %EXPORT_TAGS = ( all => [qw( hmac hmac_hex hmac_b64 hmac_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Mac Exporter);
89 our %EXPORT_TAGS = ( all => [qw( omac omac_hex omac_b64 omac_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Mac Exporter);
89 our %EXPORT_TAGS = ( all => [qw( pmac pmac_hex pmac_b64 pmac_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Mac Exporter);
89 our %EXPORT_TAGS = ( all => [qw( pelican pelican_hex pelican_b64 pelican_b64u )] );
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use base qw(Crypt::Mac Exporter);
89 our %EXPORT_TAGS = ( all => [qw( xcbc xcbc_hex xcbc_b64 xcbc_b64u )] );
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 require Exporter; our @ISA = qw(Exporter); ### use Exporter 'import';
67 our %EXPORT_TAGS = ( all => [qw( mac mac_hex )] );
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import';
67 use Carp 'croak';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use Crypt::Cipher;
89 use base 'Crypt::Mode';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use Crypt::Cipher;
89 use base 'Crypt::Mode';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use Crypt::Cipher;
89 use base 'Crypt::Mode';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use Crypt::Cipher;
89 use base 'Crypt::Mode';
33
44 use strict;
55 use warnings;
6 our $VERSION = '0.041';
67
78 use Crypt::Cipher;
89 use base 'Crypt::Mode';
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 ### METHODS
67
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 require Exporter; our @ISA = qw(Exporter); ### use Exporter 'import';
67 our %EXPORT_TAGS = ( all => [qw( dh_encrypt dh_decrypt dh_sign_message dh_verify_message dh_sign_hash dh_verify_hash dh_shared_secret )] );
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 require Exporter; our @ISA = qw(Exporter); ### use Exporter 'import';
67 our %EXPORT_TAGS = ( all => [qw( dsa_encrypt dsa_decrypt dsa_sign_message dsa_verify_message dsa_sign_hash dsa_verify_hash )] );
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 require Exporter; our @ISA = qw(Exporter); ### use Exporter 'import';
67 our %EXPORT_TAGS = ( all => [qw( ecc_encrypt ecc_decrypt ecc_sign_message ecc_verify_message ecc_sign_hash ecc_verify_hash ecc_shared_secret )] );
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 require Exporter; our @ISA = qw(Exporter); ### use Exporter 'import';
67 our %EXPORT_TAGS = ( all => [qw(rsa_encrypt rsa_decrypt rsa_sign_message rsa_verify_message rsa_sign_hash rsa_verify_hash)] );
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 use Carp;
67
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 use base qw(Crypt::PRNG Exporter);
67 our %EXPORT_TAGS = ( all => [qw(random_bytes random_bytes_hex random_bytes_b64 random_bytes_b64u random_string random_string_from rand irand)] );
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 use base qw(Crypt::PRNG Exporter);
67 our %EXPORT_TAGS = ( all => [qw(random_bytes random_bytes_hex random_bytes_b64 random_bytes_b64u random_string random_string_from rand irand)] );
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 use base qw(Crypt::PRNG Exporter);
67 our %EXPORT_TAGS = ( all => [qw(random_bytes random_bytes_hex random_bytes_b64 random_bytes_b64u random_string random_string_from rand irand)] );
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 use base qw(Crypt::PRNG Exporter);
67 our %EXPORT_TAGS = ( all => [qw(random_bytes random_bytes_hex random_bytes_b64 random_bytes_b64u random_string random_string_from rand irand)] );
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 use base qw(Exporter);
67 our %EXPORT_TAGS = ( all => [qw(random_bytes random_bytes_hex random_bytes_b64 random_bytes_b64u random_string random_string_from rand irand)] );
11
22 use strict;
33 use warnings ;
4
5 our $VERSION = '0.040';
4 our $VERSION = '0.041';
65
76 use base qw(Exporter);
87 our @EXPORT_OK = qw( _decode_json _encode_json);
11
22 use strict;
33 use warnings;
4 our $VERSION = '0.041';
45
56 use CryptX;
67