Skip to main content
Module

x/sha256/mod.ts>SHA256

SHA2-256 4 Deno
Latest
class SHA256
import { SHA256 } from "https://deno.land/x/sha256@v1.0.2/mod.ts";

A class representation of the SHA256 algorithm.

Constructors

new
SHA256()

Creates a SHA256 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 the hash with additional message data.

Initializes a hash.

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

Updates the hash with additional message data.