Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Latest commit

 

History

History
85 lines (48 loc) · 1.25 KB

HmacSha1.md

File metadata and controls

85 lines (48 loc) · 1.25 KB

Class: HmacSha1

Class to help with HmacSha1 scheme. TypeScript conversion from https://github.com/emn178/js-sha1.

Table of contents

Constructors

Methods

Constructors

constructor

new HmacSha1(key)

Create a new instance of HmacSha1.

Parameters

Name Type Description
key Uint8Array The key for the hmac.

Methods

sum

Static sum(key, data): Uint8Array

Perform Sum on the data.

Parameters

Name Type Description
key Uint8Array The key for the hmac.
data Uint8Array The data to operate on.

Returns

Uint8Array

The sum of the data.


update

update(message): HmacSha1

Update the hash with the data.

Parameters

Name Type Description
message Uint8Array The data to update the hash with.

Returns

HmacSha1

The instance for chaining.


digest

digest(): Uint8Array

Get the digest.

Returns

Uint8Array

The digest.