# phpman > info > Digest::HMAC_SHA1

Digest::[HMAC_SHA1(3pm)](https://www.chedong.com/phpMan.php/man/HMACSHA1/3pm/markdown)User Contributed Perl DocumentatioDigest::[HMAC_SHA1(3pm)](https://www.chedong.com/phpMan.php/man/HMACSHA1/3pm/markdown)

NAME
       [Digest::HMAC_SHA1](https://www.chedong.com/phpMan.php/perldoc/Digest%3A%3AHMACSHA1/markdown) - Keyed-Hashing for Message Authentication

SYNOPSIS
        # Functional style
        use [Digest::HMAC_SHA1](https://www.chedong.com/phpMan.php/perldoc/Digest%3A%3AHMACSHA1/markdown) qw(hmac_sha1 hmac_sha1_hex);
        $digest = hmac_sha1($data, $key);
        print hmac_sha1_hex($data, $key);

        # OO style
        use [Digest::HMAC_SHA1](https://www.chedong.com/phpMan.php/perldoc/Digest%3A%3AHMACSHA1/markdown);
        $hmac = [Digest::HMAC_SHA1](https://www.chedong.com/phpMan.php/perldoc/Digest%3A%3AHMACSHA1/markdown)->new($key);

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

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

DESCRIPTION
       This module provide HMAC-SHA-1 hashing.

SEE ALSO
       [Digest::HMAC](https://www.chedong.com/phpMan.php/perldoc/Digest%3A%3AHMAC/markdown), [Digest::SHA](https://www.chedong.com/phpMan.php/perldoc/Digest%3A%3ASHA/markdown), [Digest::HMAC_MD5](https://www.chedong.com/phpMan.php/perldoc/Digest%3A%3AHMACMD5/markdown)

MAINTAINER
       Andrew Rodland <<arodland@cpan.org>>

ORIGINAL AUTHOR
       Gisle Aas <<gisle@aas.no>>

perl v5.32.1                      2021-09-26            Digest::[HMAC_SHA1(3pm)](https://www.chedong.com/phpMan.php/man/HMACSHA1/3pm/markdown)
