One Hat Cyber Team
Your IP :
172.16.0.254
Server IP :
58.26.163.33
Server :
Windows NT DGPENSV2LPKMN 10.0 build 14393 (Windows Server 2016) AMD64
Server Software :
Apache/2.4.46 (Win64) OpenSSL/1.1.1h PHP/7.3.25
PHP Version :
7.3.25
Buat File
|
Buat Folder
Eksekusi
Dir :
C:
/
xampp7
/
perl
/
vendor
/
lib
/
Digest
/
View File Name :
OMAC2.pm
package Digest::OMAC2; use base qw(Digest::OMAC::Base); use strict; #use warnings; use Carp; use MIME::Base64; # we still call it Lu2 even though it's actually no longer squared ;-) sub _lu2 { my ( $self, $blocksize, $L ) = @_; $self->_shift_lu2( $L, $self->_lu2_constant($blocksize) ); } sub _shift_lu2 { my ( $self, $L, $constant ) = @_; # used to do Bit::Vector's shift_left but that's broken my $unpacked = unpack("B*",$L); my $lsb = chop $unpacked; my $Lt = pack("B*", "0" . $unpacked); if ( $lsb ) { return $Lt ^ $constant; } else { return $Lt; } } sub _lu2_constant { my ( $self, $blocksize ) = @_; if ( $blocksize == 16 ) { # 128 return ("\x80" . ("\x00" x 14) . "\x43"); } elsif ( $blocksize == 8 ) { # 64 return ("\x80" . ("\x00" x 6) . "\x0d"); } else { die "Blocksize $blocksize is not supported by OMAC"; } } 1; __END__ =pod =head1 NAME Digest::OMAC2 - OMAC 2 implementation =head1 SYNOPSIS use Digest::OMAC2; my $d = Digest::OMAC2->new( $key, $cipher ); =head1 DESCRIPTION OMAC 2 is a variant of the CMAC/OMAC 1 algorithm. The initialization routines are slightly different. OMAC2 actually precedes OMAC1, so L<Digest::CMAC>/L<Digest::OMAC1> is the reccomended version. Supposedly OMAC1 was more rigorously analyzed.