Initial Commit

This commit is contained in:
Riley Schneider
2025-12-03 16:38:10 +01:00
parent c5e26bf594
commit b732d8d4b5
17680 changed files with 5977495 additions and 2 deletions

View File

@@ -0,0 +1,147 @@
package Crypt::Mac::BLAKE2b;
### BEWARE - GENERATED FILE, DO NOT EDIT MANUALLY!
use strict;
use warnings;
our $VERSION = '0.069';
use base qw(Crypt::Mac Exporter);
our %EXPORT_TAGS = ( all => [qw( blake2b blake2b_hex blake2b_b64 blake2b_b64u )] );
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
our @EXPORT = qw();
1;
=pod
=head1 NAME
Crypt::Mac::BLAKE2b - Message authentication code BLAKE2b MAC (RFC 7693)
=head1 SYNOPSIS
### Functional interface:
use Crypt::Mac::BLAKE2b qw( blake2b blake2b_hex );
# calculate MAC from string/buffer
$blake2b_raw = blake2b($size, $key, 'data buffer');
$blake2b_hex = blake2b_hex($size, $key, 'data buffer');
$blake2b_b64 = blake2b_b64($size, $key, 'data buffer');
$blake2b_b64u = blake2b_b64u($size, $key, 'data buffer');
### OO interface:
use Crypt::Mac::BLAKE2b;
$d = Crypt::Mac::BLAKE2b->new($size, $key);
$d->add('any data');
$d->addfile('filename.dat');
$d->addfile(*FILEHANDLE);
$result_raw = $d->mac; # raw bytes
$result_hex = $d->hexmac; # hexadecimal form
$result_b64 = $d->b64mac; # Base64 form
$result_b64u = $d->b64umac; # Base64 URL Safe form
=head1 DESCRIPTION
Provides an interface to the BLAKE2b message authentication code (MAC) algorithm.
=head1 EXPORT
Nothing is exported by default.
You can export selected functions:
use Crypt::Mac::BLAKE2b qw(blake2b blake2b_hex );
Or all of them at once:
use Crypt::Mac::BLAKE2b ':all';
=head1 FUNCTIONS
=head2 blake2b
Logically joins all arguments into a single string, and returns its BLAKE2b message authentication code encoded as a binary string.
$blake2b_raw = blake2b($size, $key, 'data buffer');
#or
$blake2b_raw = blake2b($size, $key, 'any data', 'more data', 'even more data');
=head2 blake2b_hex
Logically joins all arguments into a single string, and returns its BLAKE2b message authentication code encoded as a hexadecimal string.
$blake2b_hex = blake2b_hex($size, $key, 'data buffer');
#or
$blake2b_hex = blake2b_hex($size, $key, 'any data', 'more data', 'even more data');
=head2 blake2b_b64
Logically joins all arguments into a single string, and returns its BLAKE2b message authentication code encoded as a Base64 string.
$blake2b_b64 = blake2b_b64($size, $key, 'data buffer');
#or
$blake2b_b64 = blake2b_b64($size, $key, 'any data', 'more data', 'even more data');
=head2 blake2b_b64u
Logically joins all arguments into a single string, and returns its BLAKE2b message authentication code encoded as a Base64 URL Safe string (see RFC 4648 section 5).
$blake2b_b64url = blake2b_b64u($size, $key, 'data buffer');
#or
$blake2b_b64url = blake2b_b64u($size, $key, 'any data', 'more data', 'even more data');
=head1 METHODS
=head2 new
$d = Crypt::Mac::BLAKE2b->new($size, $key);
=head2 clone
$d->clone();
=head2 reset
$d->reset();
=head2 add
$d->add('any data');
#or
$d->add('any data', 'more data', 'even more data');
=head2 addfile
$d->addfile('filename.dat');
#or
$d->addfile(*FILEHANDLE);
=head2 mac
$result_raw = $d->mac();
=head2 hexmac
$result_hex = $d->hexmac();
=head2 b64mac
$result_b64 = $d->b64mac();
=head2 b64umac
$result_b64url = $d->b64umac();
=head1 SEE ALSO
=over
=item * L<CryptX|CryptX>
=item * L<https://tools.ietf.org/html/rfc7693>
=back
=cut

View File

@@ -0,0 +1,147 @@
package Crypt::Mac::BLAKE2s;
### BEWARE - GENERATED FILE, DO NOT EDIT MANUALLY!
use strict;
use warnings;
our $VERSION = '0.069';
use base qw(Crypt::Mac Exporter);
our %EXPORT_TAGS = ( all => [qw( blake2s blake2s_hex blake2s_b64 blake2s_b64u )] );
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
our @EXPORT = qw();
1;
=pod
=head1 NAME
Crypt::Mac::BLAKE2s - Message authentication code BLAKE2s MAC (RFC 7693)
=head1 SYNOPSIS
### Functional interface:
use Crypt::Mac::BLAKE2s qw( blake2s blake2s_hex );
# calculate MAC from string/buffer
$blake2s_raw = blake2s($size, $key, 'data buffer');
$blake2s_hex = blake2s_hex($size, $key, 'data buffer');
$blake2s_b64 = blake2s_b64($size, $key, 'data buffer');
$blake2s_b64u = blake2s_b64u($size, $key, 'data buffer');
### OO interface:
use Crypt::Mac::BLAKE2s;
$d = Crypt::Mac::BLAKE2s->new($size, $key);
$d->add('any data');
$d->addfile('filename.dat');
$d->addfile(*FILEHANDLE);
$result_raw = $d->mac; # raw bytes
$result_hex = $d->hexmac; # hexadecimal form
$result_b64 = $d->b64mac; # Base64 form
$result_b64u = $d->b64umac; # Base64 URL Safe form
=head1 DESCRIPTION
Provides an interface to the BLAKE2s message authentication code (MAC) algorithm.
=head1 EXPORT
Nothing is exported by default.
You can export selected functions:
use Crypt::Mac::BLAKE2s qw(blake2s blake2s_hex );
Or all of them at once:
use Crypt::Mac::BLAKE2s ':all';
=head1 FUNCTIONS
=head2 blake2s
Logically joins all arguments into a single string, and returns its BLAKE2s message authentication code encoded as a binary string.
$blake2s_raw = blake2s($size, $key, 'data buffer');
#or
$blake2s_raw = blake2s($size, $key, 'any data', 'more data', 'even more data');
=head2 blake2s_hex
Logically joins all arguments into a single string, and returns its BLAKE2s message authentication code encoded as a hexadecimal string.
$blake2s_hex = blake2s_hex($size, $key, 'data buffer');
#or
$blake2s_hex = blake2s_hex($size, $key, 'any data', 'more data', 'even more data');
=head2 blake2s_b64
Logically joins all arguments into a single string, and returns its BLAKE2s message authentication code encoded as a Base64 string.
$blake2s_b64 = blake2s_b64($size, $key, 'data buffer');
#or
$blake2s_b64 = blake2s_b64($size, $key, 'any data', 'more data', 'even more data');
=head2 blake2s_b64u
Logically joins all arguments into a single string, and returns its BLAKE2s message authentication code encoded as a Base64 URL Safe string (see RFC 4648 section 5).
$blake2s_b64url = blake2s_b64u($size, $key, 'data buffer');
#or
$blake2s_b64url = blake2s_b64u($size, $key, 'any data', 'more data', 'even more data');
=head1 METHODS
=head2 new
$d = Crypt::Mac::BLAKE2s->new($size, $key);
=head2 clone
$d->clone();
=head2 reset
$d->reset();
=head2 add
$d->add('any data');
#or
$d->add('any data', 'more data', 'even more data');
=head2 addfile
$d->addfile('filename.dat');
#or
$d->addfile(*FILEHANDLE);
=head2 mac
$result_raw = $d->mac();
=head2 hexmac
$result_hex = $d->hexmac();
=head2 b64mac
$result_b64 = $d->b64mac();
=head2 b64umac
$result_b64url = $d->b64umac();
=head1 SEE ALSO
=over
=item * L<CryptX|CryptX>
=item * L<https://tools.ietf.org/html/rfc7693>
=back
=cut

145
database/perl/vendor/lib/Crypt/Mac/F9.pm vendored Normal file
View File

@@ -0,0 +1,145 @@
package Crypt::Mac::F9;
### BEWARE - GENERATED FILE, DO NOT EDIT MANUALLY!
use strict;
use warnings;
our $VERSION = '0.069';
use base qw(Crypt::Mac Exporter);
our %EXPORT_TAGS = ( all => [qw( f9 f9_hex f9_b64 f9_b64u )] );
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
our @EXPORT = qw();
1;
=pod
=head1 NAME
Crypt::Mac::F9 - Message authentication code F9
=head1 SYNOPSIS
### Functional interface:
use Crypt::Mac::F9 qw( f9 f9_hex );
# calculate MAC from string/buffer
$f9_raw = f9($cipher_name, $key, 'data buffer');
$f9_hex = f9_hex($cipher_name, $key, 'data buffer');
$f9_b64 = f9_b64($cipher_name, $key, 'data buffer');
$f9_b64u = f9_b64u($cipher_name, $key, 'data buffer');
### OO interface:
use Crypt::Mac::F9;
$d = Crypt::Mac::F9->new($cipher_name, $key);
$d->add('any data');
$d->addfile('filename.dat');
$d->addfile(*FILEHANDLE);
$result_raw = $d->mac; # raw bytes
$result_hex = $d->hexmac; # hexadecimal form
$result_b64 = $d->b64mac; # Base64 form
$result_b64u = $d->b64umac; # Base64 URL Safe form
=head1 DESCRIPTION
Provides an interface to the F9 message authentication code (MAC) algorithm.
=head1 EXPORT
Nothing is exported by default.
You can export selected functions:
use Crypt::Mac::F9 qw(f9 f9_hex );
Or all of them at once:
use Crypt::Mac::F9 ':all';
=head1 FUNCTIONS
=head2 f9
Logically joins all arguments into a single string, and returns its F9 message authentication code encoded as a binary string.
$f9_raw = f9($cipher_name, $key, 'data buffer');
#or
$f9_raw = f9($cipher_name, $key, 'any data', 'more data', 'even more data');
=head2 f9_hex
Logically joins all arguments into a single string, and returns its F9 message authentication code encoded as a hexadecimal string.
$f9_hex = f9_hex($cipher_name, $key, 'data buffer');
#or
$f9_hex = f9_hex($cipher_name, $key, 'any data', 'more data', 'even more data');
=head2 f9_b64
Logically joins all arguments into a single string, and returns its F9 message authentication code encoded as a Base64 string.
$f9_b64 = f9_b64($cipher_name, $key, 'data buffer');
#or
$f9_b64 = f9_b64($cipher_name, $key, 'any data', 'more data', 'even more data');
=head2 f9_b64u
Logically joins all arguments into a single string, and returns its F9 message authentication code encoded as a Base64 URL Safe string (see RFC 4648 section 5).
$f9_b64url = f9_b64u($cipher_name, $key, 'data buffer');
#or
$f9_b64url = f9_b64u($cipher_name, $key, 'any data', 'more data', 'even more data');
=head1 METHODS
=head2 new
$d = Crypt::Mac::F9->new($cipher_name, $key);
=head2 clone
$d->clone();
=head2 reset
$d->reset();
=head2 add
$d->add('any data');
#or
$d->add('any data', 'more data', 'even more data');
=head2 addfile
$d->addfile('filename.dat');
#or
$d->addfile(*FILEHANDLE);
=head2 mac
$result_raw = $d->mac();
=head2 hexmac
$result_hex = $d->hexmac();
=head2 b64mac
$result_b64 = $d->b64mac();
=head2 b64umac
$result_b64url = $d->b64umac();
=head1 SEE ALSO
=over
=item * L<CryptX|CryptX>
=back
=cut

View File

@@ -0,0 +1,164 @@
package Crypt::Mac::HMAC;
### BEWARE - GENERATED FILE, DO NOT EDIT MANUALLY!
use strict;
use warnings;
our $VERSION = '0.069';
use base qw(Crypt::Mac Exporter);
our %EXPORT_TAGS = ( all => [qw( hmac hmac_hex hmac_b64 hmac_b64u )] );
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
our @EXPORT = qw();
1;
=pod
=head1 NAME
Crypt::Mac::HMAC - Message authentication code HMAC
=head1 SYNOPSIS
### Functional interface:
use Crypt::Mac::HMAC qw( hmac hmac_hex );
# calculate MAC from string/buffer
$hmac_raw = hmac('SHA256', $key, 'data buffer');
$hmac_hex = hmac_hex('SHA256', $key, 'data buffer');
$hmac_b64 = hmac_b64('SHA256', $key, 'data buffer');
$hmac_b64u = hmac_b64u('SHA256', $key, 'data buffer');
### OO interface:
use Crypt::Mac::HMAC;
$d = Crypt::Mac::HMAC->new('SHA256', $key);
$d->add('any data');
$d->addfile('filename.dat');
$d->addfile(*FILEHANDLE);
$result_raw = $d->mac; # raw bytes
$result_hex = $d->hexmac; # hexadecimal form
$result_b64 = $d->b64mac; # Base64 form
$result_b64u = $d->b64umac; # Base64 URL Safe form
=head1 DESCRIPTION
Provides an interface to the HMAC message authentication code (MAC) algorithm.
=head1 EXPORT
Nothing is exported by default.
You can export selected functions:
use Crypt::Mac::HMAC qw(hmac hmac_hex );
Or all of them at once:
use Crypt::Mac::HMAC ':all';
=head1 FUNCTIONS
=head2 hmac
Logically joins all arguments into a single string, and returns its HMAC message authentication code encoded as a binary string.
$hmac_raw = hmac($hash_name, $key, 'data buffer');
#or
$hmac_raw = hmac($hash_name, $key, 'any data', 'more data', 'even more data');
# $hash_name ... any <NAME> for which there exists Crypt::Digest::<NAME>
# $key ......... the key (octets/bytes)
=head2 hmac_hex
Logically joins all arguments into a single string, and returns its HMAC message authentication code encoded as a hexadecimal string.
$hmac_hex = hmac_hex($hash_name, $key, 'data buffer');
#or
$hmac_hex = hmac_hex($hash_name, $key, 'any data', 'more data', 'even more data');
# $hash_name ... any <NAME> for which there exists Crypt::Digest::<NAME>
# $key ......... the key (octets/bytes, not hex!)
=head2 hmac_b64
Logically joins all arguments into a single string, and returns its HMAC message authentication code encoded as a Base64 string.
$hmac_b64 = hmac_b64($hash_name, $key, 'data buffer');
#or
$hmac_b64 = hmac_b64($hash_name, $key, 'any data', 'more data', 'even more data');
# $hash_name ... any <NAME> for which there exists Crypt::Digest::<NAME>
# $key ......... the key (octets/bytes, not Base64!)
=head2 hmac_b64u
Logically joins all arguments into a single string, and returns its HMAC message authentication code encoded as a Base64 URL Safe string (see RFC 4648 section 5).
$hmac_b64url = hmac_b64u($hash_name, $key, 'data buffer');
#or
$hmac_b64url = hmac_b64u($hash_name, $key, 'any data', 'more data', 'even more data');
# $hash_name ... any <NAME> for which there exists Crypt::Digest::<NAME>
# $key ......... the key (octets/bytes, not Base64url!)
=head1 METHODS
=head2 new
$d = Crypt::Mac::HMAC->new($hash_name, $key);
# $hash_name ... any <NAME> for which there exists Crypt::Digest::<NAME>
# $key ......... the key (octets/bytes)
=head2 clone
$d->clone();
=head2 reset
$d->reset();
=head2 add
$d->add('any data');
#or
$d->add('any data', 'more data', 'even more data');
=head2 addfile
$d->addfile('filename.dat');
#or
$d->addfile(*FILEHANDLE);
=head2 mac
$result_raw = $d->mac();
=head2 hexmac
$result_hex = $d->hexmac();
=head2 b64mac
$result_b64 = $d->b64mac();
=head2 b64umac
$result_b64url = $d->b64umac();
=head1 SEE ALSO
=over
=item * L<CryptX|CryptX>
=item * L<https://en.wikipedia.org/wiki/Hmac>
=item * L<https://tools.ietf.org/html/rfc2104>
=back
=cut

View File

@@ -0,0 +1,147 @@
package Crypt::Mac::OMAC;
### BEWARE - GENERATED FILE, DO NOT EDIT MANUALLY!
use strict;
use warnings;
our $VERSION = '0.069';
use base qw(Crypt::Mac Exporter);
our %EXPORT_TAGS = ( all => [qw( omac omac_hex omac_b64 omac_b64u )] );
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
our @EXPORT = qw();
1;
=pod
=head1 NAME
Crypt::Mac::OMAC - Message authentication code OMAC
=head1 SYNOPSIS
### Functional interface:
use Crypt::Mac::OMAC qw( omac omac_hex );
# calculate MAC from string/buffer
$omac_raw = omac($cipher_name, $key, 'data buffer');
$omac_hex = omac_hex($cipher_name, $key, 'data buffer');
$omac_b64 = omac_b64($cipher_name, $key, 'data buffer');
$omac_b64u = omac_b64u($cipher_name, $key, 'data buffer');
### OO interface:
use Crypt::Mac::OMAC;
$d = Crypt::Mac::OMAC->new($cipher_name, $key);
$d->add('any data');
$d->addfile('filename.dat');
$d->addfile(*FILEHANDLE);
$result_raw = $d->mac; # raw bytes
$result_hex = $d->hexmac; # hexadecimal form
$result_b64 = $d->b64mac; # Base64 form
$result_b64u = $d->b64umac; # Base64 URL Safe form
=head1 DESCRIPTION
Provides an interface to the OMAC message authentication code (MAC) algorithm.
=head1 EXPORT
Nothing is exported by default.
You can export selected functions:
use Crypt::Mac::OMAC qw(omac omac_hex );
Or all of them at once:
use Crypt::Mac::OMAC ':all';
=head1 FUNCTIONS
=head2 omac
Logically joins all arguments into a single string, and returns its OMAC message authentication code encoded as a binary string.
$omac_raw = omac($cipher_name, $key, 'data buffer');
#or
$omac_raw = omac($cipher_name, $key, 'any data', 'more data', 'even more data');
=head2 omac_hex
Logically joins all arguments into a single string, and returns its OMAC message authentication code encoded as a hexadecimal string.
$omac_hex = omac_hex($cipher_name, $key, 'data buffer');
#or
$omac_hex = omac_hex($cipher_name, $key, 'any data', 'more data', 'even more data');
=head2 omac_b64
Logically joins all arguments into a single string, and returns its OMAC message authentication code encoded as a Base64 string.
$omac_b64 = omac_b64($cipher_name, $key, 'data buffer');
#or
$omac_b64 = omac_b64($cipher_name, $key, 'any data', 'more data', 'even more data');
=head2 omac_b64u
Logically joins all arguments into a single string, and returns its OMAC message authentication code encoded as a Base64 URL Safe string (see RFC 4648 section 5).
$omac_b64url = omac_b64u($cipher_name, $key, 'data buffer');
#or
$omac_b64url = omac_b64u($cipher_name, $key, 'any data', 'more data', 'even more data');
=head1 METHODS
=head2 new
$d = Crypt::Mac::OMAC->new($cipher_name, $key);
=head2 clone
$d->clone();
=head2 reset
$d->reset();
=head2 add
$d->add('any data');
#or
$d->add('any data', 'more data', 'even more data');
=head2 addfile
$d->addfile('filename.dat');
#or
$d->addfile(*FILEHANDLE);
=head2 mac
$result_raw = $d->mac();
=head2 hexmac
$result_hex = $d->hexmac();
=head2 b64mac
$result_b64 = $d->b64mac();
=head2 b64umac
$result_b64url = $d->b64umac();
=head1 SEE ALSO
=over
=item * L<CryptX|CryptX>
=item * L<https://en.wikipedia.org/wiki/OMAC_%28cryptography%29>
=back
=cut

View File

@@ -0,0 +1,147 @@
package Crypt::Mac::PMAC;
### BEWARE - GENERATED FILE, DO NOT EDIT MANUALLY!
use strict;
use warnings;
our $VERSION = '0.069';
use base qw(Crypt::Mac Exporter);
our %EXPORT_TAGS = ( all => [qw( pmac pmac_hex pmac_b64 pmac_b64u )] );
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
our @EXPORT = qw();
1;
=pod
=head1 NAME
Crypt::Mac::PMAC - Message authentication code PMAC
=head1 SYNOPSIS
### Functional interface:
use Crypt::Mac::PMAC qw( pmac pmac_hex );
# calculate MAC from string/buffer
$pmac_raw = pmac($cipher_name, $key, 'data buffer');
$pmac_hex = pmac_hex($cipher_name, $key, 'data buffer');
$pmac_b64 = pmac_b64($cipher_name, $key, 'data buffer');
$pmac_b64u = pmac_b64u($cipher_name, $key, 'data buffer');
### OO interface:
use Crypt::Mac::PMAC;
$d = Crypt::Mac::PMAC->new($cipher_name, $key);
$d->add('any data');
$d->addfile('filename.dat');
$d->addfile(*FILEHANDLE);
$result_raw = $d->mac; # raw bytes
$result_hex = $d->hexmac; # hexadecimal form
$result_b64 = $d->b64mac; # Base64 form
$result_b64u = $d->b64umac; # Base64 URL Safe form
=head1 DESCRIPTION
Provides an interface to the PMAC message authentication code (MAC) algorithm.
=head1 EXPORT
Nothing is exported by default.
You can export selected functions:
use Crypt::Mac::PMAC qw(pmac pmac_hex );
Or all of them at once:
use Crypt::Mac::PMAC ':all';
=head1 FUNCTIONS
=head2 pmac
Logically joins all arguments into a single string, and returns its PMAC message authentication code encoded as a binary string.
$pmac_raw = pmac($cipher_name, $key, 'data buffer');
#or
$pmac_raw = pmac($cipher_name, $key, 'any data', 'more data', 'even more data');
=head2 pmac_hex
Logically joins all arguments into a single string, and returns its PMAC message authentication code encoded as a hexadecimal string.
$pmac_hex = pmac_hex($cipher_name, $key, 'data buffer');
#or
$pmac_hex = pmac_hex($cipher_name, $key, 'any data', 'more data', 'even more data');
=head2 pmac_b64
Logically joins all arguments into a single string, and returns its PMAC message authentication code encoded as a Base64 string.
$pmac_b64 = pmac_b64($cipher_name, $key, 'data buffer');
#or
$pmac_b64 = pmac_b64($cipher_name, $key, 'any data', 'more data', 'even more data');
=head2 pmac_b64u
Logically joins all arguments into a single string, and returns its PMAC message authentication code encoded as a Base64 URL Safe string (see RFC 4648 section 5).
$pmac_b64url = pmac_b64u($cipher_name, $key, 'data buffer');
#or
$pmac_b64url = pmac_b64u($cipher_name, $key, 'any data', 'more data', 'even more data');
=head1 METHODS
=head2 new
$d = Crypt::Mac::PMAC->new($cipher_name, $key);
=head2 clone
$d->clone();
=head2 reset
$d->reset();
=head2 add
$d->add('any data');
#or
$d->add('any data', 'more data', 'even more data');
=head2 addfile
$d->addfile('filename.dat');
#or
$d->addfile(*FILEHANDLE);
=head2 mac
$result_raw = $d->mac();
=head2 hexmac
$result_hex = $d->hexmac();
=head2 b64mac
$result_b64 = $d->b64mac();
=head2 b64umac
$result_b64url = $d->b64umac();
=head1 SEE ALSO
=over
=item * L<CryptX|CryptX>
=item * L<https://en.wikipedia.org/wiki/PMAC_%28cryptography%29>
=back
=cut

View File

@@ -0,0 +1,147 @@
package Crypt::Mac::Pelican;
### BEWARE - GENERATED FILE, DO NOT EDIT MANUALLY!
use strict;
use warnings;
our $VERSION = '0.069';
use base qw(Crypt::Mac Exporter);
our %EXPORT_TAGS = ( all => [qw( pelican pelican_hex pelican_b64 pelican_b64u )] );
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
our @EXPORT = qw();
1;
=pod
=head1 NAME
Crypt::Mac::Pelican - Message authentication code Pelican (AES based MAC)
=head1 SYNOPSIS
### Functional interface:
use Crypt::Mac::Pelican qw( pelican pelican_hex );
# calculate MAC from string/buffer
$pelican_raw = pelican($key, 'data buffer');
$pelican_hex = pelican_hex($key, 'data buffer');
$pelican_b64 = pelican_b64($key, 'data buffer');
$pelican_b64u = pelican_b64u($key, 'data buffer');
### OO interface:
use Crypt::Mac::Pelican;
$d = Crypt::Mac::Pelican->new($key);
$d->add('any data');
$d->addfile('filename.dat');
$d->addfile(*FILEHANDLE);
$result_raw = $d->mac; # raw bytes
$result_hex = $d->hexmac; # hexadecimal form
$result_b64 = $d->b64mac; # Base64 form
$result_b64u = $d->b64umac; # Base64 URL Safe form
=head1 DESCRIPTION
Provides an interface to the Pelican message authentication code (MAC) algorithm.
=head1 EXPORT
Nothing is exported by default.
You can export selected functions:
use Crypt::Mac::Pelican qw(pelican pelican_hex );
Or all of them at once:
use Crypt::Mac::Pelican ':all';
=head1 FUNCTIONS
=head2 pelican
Logically joins all arguments into a single string, and returns its Pelican message authentication code encoded as a binary string.
$pelican_raw = pelican($key, 'data buffer');
#or
$pelican_raw = pelican($key, 'any data', 'more data', 'even more data');
=head2 pelican_hex
Logically joins all arguments into a single string, and returns its Pelican message authentication code encoded as a hexadecimal string.
$pelican_hex = pelican_hex($key, 'data buffer');
#or
$pelican_hex = pelican_hex($key, 'any data', 'more data', 'even more data');
=head2 pelican_b64
Logically joins all arguments into a single string, and returns its Pelican message authentication code encoded as a Base64 string.
$pelican_b64 = pelican_b64($key, 'data buffer');
#or
$pelican_b64 = pelican_b64($key, 'any data', 'more data', 'even more data');
=head2 pelican_b64u
Logically joins all arguments into a single string, and returns its Pelican message authentication code encoded as a Base64 URL Safe string (see RFC 4648 section 5).
$pelican_b64url = pelican_b64u($key, 'data buffer');
#or
$pelican_b64url = pelican_b64u($key, 'any data', 'more data', 'even more data');
=head1 METHODS
=head2 new
$d = Crypt::Mac::Pelican->new($key);
=head2 clone
$d->clone();
=head2 reset
$d->reset();
=head2 add
$d->add('any data');
#or
$d->add('any data', 'more data', 'even more data');
=head2 addfile
$d->addfile('filename.dat');
#or
$d->addfile(*FILEHANDLE);
=head2 mac
$result_raw = $d->mac();
=head2 hexmac
$result_hex = $d->hexmac();
=head2 b64mac
$result_b64 = $d->b64mac();
=head2 b64umac
$result_b64url = $d->b64umac();
=head1 SEE ALSO
=over
=item * L<CryptX|CryptX>
=item * L<http://eprint.iacr.org/2005/088.pdf>
=back
=cut

View File

@@ -0,0 +1,147 @@
package Crypt::Mac::Poly1305;
### BEWARE - GENERATED FILE, DO NOT EDIT MANUALLY!
use strict;
use warnings;
our $VERSION = '0.069';
use base qw(Crypt::Mac Exporter);
our %EXPORT_TAGS = ( all => [qw( poly1305 poly1305_hex poly1305_b64 poly1305_b64u )] );
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
our @EXPORT = qw();
1;
=pod
=head1 NAME
Crypt::Mac::Poly1305 - Message authentication code Poly1305 (RFC 7539)
=head1 SYNOPSIS
### Functional interface:
use Crypt::Mac::Poly1305 qw( poly1305 poly1305_hex );
# calculate MAC from string/buffer
$poly1305_raw = poly1305($key, 'data buffer');
$poly1305_hex = poly1305_hex($key, 'data buffer');
$poly1305_b64 = poly1305_b64($key, 'data buffer');
$poly1305_b64u = poly1305_b64u($key, 'data buffer');
### OO interface:
use Crypt::Mac::Poly1305;
$d = Crypt::Mac::Poly1305->new($key);
$d->add('any data');
$d->addfile('filename.dat');
$d->addfile(*FILEHANDLE);
$result_raw = $d->mac; # raw bytes
$result_hex = $d->hexmac; # hexadecimal form
$result_b64 = $d->b64mac; # Base64 form
$result_b64u = $d->b64umac; # Base64 URL Safe form
=head1 DESCRIPTION
Provides an interface to the Poly1305 message authentication code (MAC) algorithm.
=head1 EXPORT
Nothing is exported by default.
You can export selected functions:
use Crypt::Mac::Poly1305 qw(poly1305 poly1305_hex );
Or all of them at once:
use Crypt::Mac::Poly1305 ':all';
=head1 FUNCTIONS
=head2 poly1305
Logically joins all arguments into a single string, and returns its Poly1305 message authentication code encoded as a binary string.
$poly1305_raw = poly1305($key, 'data buffer');
#or
$poly1305_raw = poly1305($key, 'any data', 'more data', 'even more data');
=head2 poly1305_hex
Logically joins all arguments into a single string, and returns its Poly1305 message authentication code encoded as a hexadecimal string.
$poly1305_hex = poly1305_hex($key, 'data buffer');
#or
$poly1305_hex = poly1305_hex($key, 'any data', 'more data', 'even more data');
=head2 poly1305_b64
Logically joins all arguments into a single string, and returns its Poly1305 message authentication code encoded as a Base64 string.
$poly1305_b64 = poly1305_b64($key, 'data buffer');
#or
$poly1305_b64 = poly1305_b64($key, 'any data', 'more data', 'even more data');
=head2 poly1305_b64u
Logically joins all arguments into a single string, and returns its Poly1305 message authentication code encoded as a Base64 URL Safe string (see RFC 4648 section 5).
$poly1305_b64url = poly1305_b64u($key, 'data buffer');
#or
$poly1305_b64url = poly1305_b64u($key, 'any data', 'more data', 'even more data');
=head1 METHODS
=head2 new
$d = Crypt::Mac::Poly1305->new($key);
=head2 clone
$d->clone();
=head2 reset
$d->reset();
=head2 add
$d->add('any data');
#or
$d->add('any data', 'more data', 'even more data');
=head2 addfile
$d->addfile('filename.dat');
#or
$d->addfile(*FILEHANDLE);
=head2 mac
$result_raw = $d->mac();
=head2 hexmac
$result_hex = $d->hexmac();
=head2 b64mac
$result_b64 = $d->b64mac();
=head2 b64umac
$result_b64url = $d->b64umac();
=head1 SEE ALSO
=over
=item * L<CryptX|CryptX>
=item * L<https://www.ietf.org/rfc/rfc7539.txt>
=back
=cut

View File

@@ -0,0 +1,147 @@
package Crypt::Mac::XCBC;
### BEWARE - GENERATED FILE, DO NOT EDIT MANUALLY!
use strict;
use warnings;
our $VERSION = '0.069';
use base qw(Crypt::Mac Exporter);
our %EXPORT_TAGS = ( all => [qw( xcbc xcbc_hex xcbc_b64 xcbc_b64u )] );
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
our @EXPORT = qw();
1;
=pod
=head1 NAME
Crypt::Mac::XCBC - Message authentication code XCBC (RFC 3566)
=head1 SYNOPSIS
### Functional interface:
use Crypt::Mac::XCBC qw( xcbc xcbc_hex );
# calculate MAC from string/buffer
$xcbc_raw = xcbc($cipher_name, $key, 'data buffer');
$xcbc_hex = xcbc_hex($cipher_name, $key, 'data buffer');
$xcbc_b64 = xcbc_b64($cipher_name, $key, 'data buffer');
$xcbc_b64u = xcbc_b64u($cipher_name, $key, 'data buffer');
### OO interface:
use Crypt::Mac::XCBC;
$d = Crypt::Mac::XCBC->new($cipher_name, $key);
$d->add('any data');
$d->addfile('filename.dat');
$d->addfile(*FILEHANDLE);
$result_raw = $d->mac; # raw bytes
$result_hex = $d->hexmac; # hexadecimal form
$result_b64 = $d->b64mac; # Base64 form
$result_b64u = $d->b64umac; # Base64 URL Safe form
=head1 DESCRIPTION
Provides an interface to the XCBC message authentication code (MAC) algorithm.
=head1 EXPORT
Nothing is exported by default.
You can export selected functions:
use Crypt::Mac::XCBC qw(xcbc xcbc_hex );
Or all of them at once:
use Crypt::Mac::XCBC ':all';
=head1 FUNCTIONS
=head2 xcbc
Logically joins all arguments into a single string, and returns its XCBC message authentication code encoded as a binary string.
$xcbc_raw = xcbc($cipher_name, $key, 'data buffer');
#or
$xcbc_raw = xcbc($cipher_name, $key, 'any data', 'more data', 'even more data');
=head2 xcbc_hex
Logically joins all arguments into a single string, and returns its XCBC message authentication code encoded as a hexadecimal string.
$xcbc_hex = xcbc_hex($cipher_name, $key, 'data buffer');
#or
$xcbc_hex = xcbc_hex($cipher_name, $key, 'any data', 'more data', 'even more data');
=head2 xcbc_b64
Logically joins all arguments into a single string, and returns its XCBC message authentication code encoded as a Base64 string.
$xcbc_b64 = xcbc_b64($cipher_name, $key, 'data buffer');
#or
$xcbc_b64 = xcbc_b64($cipher_name, $key, 'any data', 'more data', 'even more data');
=head2 xcbc_b64u
Logically joins all arguments into a single string, and returns its XCBC message authentication code encoded as a Base64 URL Safe string (see RFC 4648 section 5).
$xcbc_b64url = xcbc_b64u($cipher_name, $key, 'data buffer');
#or
$xcbc_b64url = xcbc_b64u($cipher_name, $key, 'any data', 'more data', 'even more data');
=head1 METHODS
=head2 new
$d = Crypt::Mac::XCBC->new($cipher_name, $key);
=head2 clone
$d->clone();
=head2 reset
$d->reset();
=head2 add
$d->add('any data');
#or
$d->add('any data', 'more data', 'even more data');
=head2 addfile
$d->addfile('filename.dat');
#or
$d->addfile(*FILEHANDLE);
=head2 mac
$result_raw = $d->mac();
=head2 hexmac
$result_hex = $d->hexmac();
=head2 b64mac
$result_b64 = $d->b64mac();
=head2 b64umac
$result_b64url = $d->b64umac();
=head1 SEE ALSO
=over
=item * L<CryptX|CryptX>
=item * L<https://www.ietf.org/rfc/rfc3566.txt>
=back
=cut