The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Authen::HTTP::Signature::Method::HMAC - Compute digest using a symmetric key

PURPOSE

This class uses a symmetric key to compute a HTTP signature digest. It implements the HMAC-SHA{1, 256, 512} algorithms.

ATTRIBUTES

These are Perlish mutators; pass a value to set it, pass no value to get the current value.

key

Key material. Read-only. Required.

data

The data to be signed. Read-only. Required.

hash

The algorithm to generate the digest. Read-only. Required.

METHODS

sign()

Signs data with key using hash.

Returns a Base 64 encoded digest.

verify()

Compares the given signature to a computed one. Returns true if they are the same. False otherwise.

SEE ALSO

Authen::HTTP::Signature