#!/usr/local/bin/perl
use
diagnostics;
use
strict;
use
warnings;
"Enter key: "
;
my
$key
= <STDIN>;
chomp
$key
;
"Enter cipher: "
;
my
$cipher
= <STDIN>;
chomp
$cipher
;
local
$/ =
undef
;
while
(<>) {
my
$mac
= dmac(
$key
,
$cipher
,
$_
);
hexdigest(
$mac
),
"\n"
;
}