UNPKG

@syncfusion/ej2-pdf

Version:

Feature-rich JavaScript PDF library with built-in support for loading and manipulating PDF document.

68 lines (67 loc) 2.23 kB
import { _PdfNativeAccumulatorSink, _PdfNativeHashInput } from '../digital-signature/signature/pdf-accumulator'; /** * SHA-256 hash implementation used internally for PDF cryptography. * * @private */ export declare class _Sha256 { /** * Create a chunked conversion sink for incremental hashing. * * @private * @param {_PdfNativeAccumulatorSink} outputSink - Sink that will receive the hash output. * @returns {_PdfNativeHashInput} A `_PdfNativeHashInput` for feeding chunks. */ _startChunkedConversion(outputSink: _PdfNativeAccumulatorSink): _PdfNativeHashInput; /** * Rotate a 32 bit value right by `n` bits. * * @private * @param {number} x - The 32 bit value to rotate. * @param {number} n - The number of bits to rotate. * @returns {number} The rotated 32-bit value. */ _rotateRight(x: number, n: number): number; /** * Upper case sigma function used in SHA-256. * * @private * @param {number} x - The input 32-bit word. * @returns {number} The transformed 32-bit word. */ _sigma(x: number): number; /** * Upper-case sigma prime function used in SHA-256. * * @private * @param {number} x - The input 32-bit word. * @returns {number} The transformed 32-bit word. */ _sigmaPrime(x: number): number; /** * Lower-case sigma function used in the message schedule. * * @private * @param {number} x - The input 32-bit word. * @returns {number} The transformed 32-bit word. */ _littleSigma(x: number): number; /** * Lower-case sigma prime function used in the message schedule. * * @private * @param {number} x The input 32-bit word. * @returns {number} The transformed 32-bit word. */ _littleSigmaPrime(x: number): number; /** * Compute the SHA-256 hash for a slice of bytes. * * @private * @param {Uint8Array} data bytes. * @param {number} offset into `data`. * @param {number} length of bytes to hash. * @returns {Uint8Array} The 32-byte SHA-256 digest as `Uint8Array`. */ _hash(data: Uint8Array, offset: number, length: number): Uint8Array; }