@technobuddha/library
Version:
A large library of useful functions
41 lines (40 loc) • 1.18 kB
TypeScript
import { ShaBase } from './sha-base.ts';
/**
* Secure Hash Algorithm, SHA2 SHA-224
* @example
* ```typescript
* const sha224 = new Sha224();
* sha224.update('hello world', 'utf8');
* sha224.digest('hex');
* // '23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7'
* ```
* ```typescript
* const sha224 = new Sha224();
* sha224.update(new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64]));
* sha224.digest('hex');
* // '23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7'
* ```
* @group Binary
* @category Hash
*/
export declare class Sha224 extends ShaBase {
private a;
private b;
private c;
private d;
private e;
private f;
private g;
private h;
private readonly w;
/**
* Creates a new SHA-224 hash instance and initializes its internal state.
*
* @remarks
* The internal state variables are set to the initial SHA-224 constants as specified
* in FIPS PUB 180-4. Use {@link update} to process data and {@link digest} to retrieve the hash.
*/
constructor();
protected updateCounters(buffer: Uint8Array): void;
protected hash(): Uint8Array;
}