perldoc > Crypt::Mac::F9(3pm)

📛 NAME

Crypt::Mac::F9 - Message authentication code F9

🚀 Quick Reference

Use CaseCommandDescription
Compute binary MACf9($cipher, $key, $data)Returns raw binary F9 MAC
Compute hex MACf9_hex($cipher, $key, $data)Returns hex-encoded F9 MAC
Compute Base64 MACf9_b64($cipher, $key, $data)Returns Base64-encoded MAC
Compute URL-safe Base64 MACf9_b64u($cipher, $key, $data)Returns Base64 URL-safe MAC
OO: new objectCrypt::Mac::F9->new($cipher, $key)Creates F9 MAC object
OO: add data$d->add($data)Adds data incrementally
OO: add file$d->addfile('path')Adds contents of a file
OO: finalize (raw)$d->macReturns binary MAC
OO: finalize (hex)$d->hexmacReturns hex MAC
OO: finalize (Base64)$d->b64macReturns Base64 MAC
OO: finalize (Base64 URL)$d->b64umacReturns URL-safe Base64 MAC

📖 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

🔐 DESCRIPTION

Provides an interface to the F9 message authentication code (MAC) algorithm.

📤 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';

🔧 FUNCTIONS

âœī¸ 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');

đŸ”ĸ 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');

📜 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');

🌐 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');

đŸ› ī¸ METHODS

🆕 new

$d = Crypt::Mac::F9->new($cipher_name, $key);

🔄 clone

$d->clone();

â†Šī¸ reset

$d->reset();

đŸ“Ĩ add

$d->add('any data');
#or
$d->add('any data', 'more data', 'even more data');

📁 addfile

$d->addfile('filename.dat');
#or
$d->addfile(*FILEHANDLE);

🔒 mac

$result_raw = $d->mac();

đŸ”ĸ hexmac

$result_hex = $d->hexmac();

📜 b64mac

$result_b64 = $d->b64mac();

🌐 b64umac

$result_b64url = $d->b64umac();

📚 SEE ALSO

Crypt::Mac::F9(3pm)
📛 NAME 🚀 Quick Reference 📖 SYNOPSIS
âš™ī¸ Functional interface đŸ—ī¸ OO interface
🔐 DESCRIPTION 📤 EXPORT 🔧 FUNCTIONS
âœī¸ f9 đŸ”ĸ f9_hex 📜 f9_b64 🌐 f9_b64u
đŸ› ī¸ METHODS
🆕 new 🔄 clone â†Šī¸ reset đŸ“Ĩ add 📁 addfile 🔒 mac đŸ”ĸ hexmac 📜 b64mac 🌐 b64umac
📚 SEE ALSO

Generated by phpman v4.9.22-1-g1b0fcb4 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-05 02:22 @216.73.216.52
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-pro / taotoken.net / www.chedong.com - original format

^_top_^