UNPKG

@technobuddha/library

Version:
49 lines (48 loc) 1.4 kB
import { ShaBase } from './sha-base.ts'; /** * Secure Hash Algorithm, SHA2 SHA-384 * @example * ```typescript * const sha384 = new Sha384(); * sha384.update('hello world', 'utf8'); * sha384.digest('hex'); * // 'fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd' * ``` * ```typescript * const sha384 = new Sha384(); * sha384.update(new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64])); * sha384.digest('hex'); * // 'fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd' * ``` * @group Binary * @category Hash */ export declare class Sha384 extends ShaBase { private aH; private bH; private cH; private dH; private eH; private fH; private gH; private hH; private aL; private bL; private cL; private dL; private eL; private fL; private gL; private hL; private readonly w; /** * Creates a new SHA-384 hash instance and initializes its internal state. * * @remarks * The internal state variables are set to the initial SHA-384 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; }