Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use strict;
- use cgi; # no
- use Fcntl qw(:DEFAULT :flock); # no
- use MIME::Base64;
- use Digest::SHA qw(hmac_sha1);
- use Date::Parse;
- use DateTime;
- my $dt = DateTime->now;
- my $date = $dt->ymd; # 'yyyy-mm-dd'
- my $time = $dt->hms; # 'hh:mm:ss'
- my $IDAdmin = "1337",
- my $Password = "1337",
- my $TimeStamp = str2time("$date, $time");
- print encode_base64(hmac_sha1("$IDAdmin:$Password:$TimeStamp", 'key'));
- ####################################
- # Output :- #
- # 8QkkN/WGRccHVK0Tlhbz03kTs/A= #
- # #
- # Decode With Key :- #
- # #
- # ·ّؤn|?م²jTk▼!1تKz&{ #
- # #
- # :( #
- # #
- ####################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement