@syncfusion/ej2-pdf
Version:
Feature-rich JavaScript PDF library with built-in support for loading and manipulating PDF document.
36 lines (35 loc) • 1.26 kB
TypeScript
import { _PdfNativeAccumulatorSink, _PdfNativeHashInput } from '../digital-signature/signature/pdf-accumulator';
/**
* SHA-1 hash implementation used internally for PDF cryptography.
*
* @private
*/
export declare class _Sha1 {
/**
* 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 left by `n` bits.
*
* @private
* @param {number} x - Value to rotate.
* @param {number} n - Number of bits.
* @returns {number} The rotated value.
*/
_rotateLeft(x: number, n: number): number;
/**
* Compute the SHA-1 hash for a slice of bytes.
*
* @private
* @param {Uint8Array} data - Input bytes.
* @param {number} offset - Start offset into `data`.
* @param {number} length - Number of bytes to hash.
* @returns {Uint8Array} The 20-byte SHA-1 digest as `Uint8Array`.
*/
_hash(data: Uint8Array, offset: number, length: number): Uint8Array;
}