perldoc > Digest::HMAC_SHA1

πŸ“› NAME

Digest::HMAC_SHA1 β€” Keyed‑Hashing for Message Authentication

πŸš€ Quick Reference

Use CaseCommandDescription
Compute HMAC‑SHA‑1 digest (binary)hmac_sha1($data, $key)Functional style β€” returns raw bytes
Compute HMAC‑SHA‑1 hex digesthmac_sha1_hex($data, $key)Functional style β€” returns hexadecimal string
OO style β€” create HMAC objectDigest::HMAC_SHA1->new($key)Returns a new HMAC object with given key
OO style β€” add data$hmac->add($data)Feed data to the HMAC computation
OO style β€” add file$hmac->addfile(*FILE)Feed data from a filehandle
OO style β€” get binary digest$hmac->digestReturns raw binary digest
OO style β€” get hex digest$hmac->hexdigestReturns hexadecimal string
OO style β€” get base64 digest$hmac->b64digestReturns Base64 encoded string

πŸ“ SYNOPSIS

# Functional style
use Digest::HMAC_SHA1 qw(hmac_sha1 hmac_sha1_hex);
$digest = hmac_sha1($data, $key);
print hmac_sha1_hex($data, $key);

# OO style
use Digest::HMAC_SHA1;
$hmac = Digest::HMAC_SHA1->new($key);

$hmac->add($data);
$hmac->addfile(*FILE);

$digest = $hmac->digest;
$digest = $hmac->hexdigest;
$digest = $hmac->b64digest;

πŸ“– DESCRIPTION

This module provides HMAC‑SHA‑1 hashing.

πŸ‘€ SEE ALSO

πŸ› οΈ MAINTAINER

Andrew Rodland <arodland AT cpan.org>

✍️ ORIGINAL AUTHOR

Gisle Aas <gisle AT aas.no>

Digest::HMAC_SHA1
πŸ“› NAME πŸš€ Quick Reference πŸ“ SYNOPSIS πŸ“– DESCRIPTION πŸ‘€ SEE ALSO πŸ› οΈ MAINTAINER ✍️ ORIGINAL AUTHOR

Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-06 08:51 @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!