Skip to main content
Module

x/hmac/deps.ts>SHA1

hash-based message authentication code
Latest
class SHA1
import { SHA1 } from "https://deno.land/x/hmac@v2.0.1/deps.ts";

A class representation of the SHA1 algorithm.

Constructors

new
SHA1()

Creates a SHA1 instance.

Properties

private
_buf: Uint8Array
private
_bufIdx: number
private
_count: Uint32Array
private
_finalized: boolean
private
_H: Uint32Array
private
_K: Uint32Array
readonly
hashSize: number

Methods

private
transform(): void

Performs one transformation cycle.

digest(outputEncoding?: string): string | Uint8Array

Finalizes a hash with additional message data.

Initializes a hash instance.

update(msg: string | Uint8Array, inputEncoding?: string): SHA1

Updates a hash with additional message data.

Static Methods

protected
F(
t: number,
b: number,
c: number,
d: number,
): number

Reduces the four input numbers to a single one.