UNPKG

@syncfusion/ej2-pdf

Version:

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

115 lines (114 loc) 3.55 kB
import { _PdfAbstractSyntaxElement } from '../asn1/abstract-syntax'; import { _PdfPublicKeyInformation } from './x509-certificate-key'; import { _PdfX509CertificateStructure } from './x509-certificate-structure'; import { _PdfCipherParameter } from './x509-cipher-handler'; import { _PdfX509ExtensionBase, _PdfX509Extensions } from './x509-extensions'; /** * Wrapper around X.509 certificate data and helpers to extract keys and extensions. * * @private */ export declare class _PdfX509Certificate extends _PdfX509ExtensionBase { /** * Parsed certificate structure backing this certificate. * * @private * @type {_PdfX509CertificateStructure} */ _structure: _PdfX509CertificateStructure; /** * Raw public key bytes extracted from the certificate (if available). * * @private * @type {Uint8Array} */ _publicKeyBytes: Uint8Array; /** * Key usage bits parsed from the certificate extensions. * * @private * @type {boolean[]} */ _keyUsage: boolean[]; constructor(certificate: _PdfX509CertificateStructure); /** * Retrieve the certificate extensions wrapper when present. * * @private * @returns {_PdfX509Extensions} Certificate extensions container. */ _getExtensions(): _PdfX509Extensions; /** * Extract and return the public key parameters for this certificate. * * @private * @returns {_PdfCipherParameter} The parsed public key parameters. */ _getPublicKey(): _PdfCipherParameter; /** * Create a cipher parameter object from SubjectPublicKeyInfo. * * @private * @param {_PdfPublicKeyInformation} publicKeyInfo - Parsed public key information. * @returns {_PdfCipherParameter} The created cipher parameter instance. */ _createKey(publicKeyInfo: _PdfPublicKeyInformation): _PdfCipherParameter; /** * Parse an ASN.1 public key element (e.g., RSA modulus/exponent) into parameters. * * @private * @param {_PdfAbstractSyntaxElement} publicKey - ASN.1 element containing public key data. * @returns {_PdfCipherParameter} The parsed cipher parameters. */ _parsePublicKey(publicKey: _PdfAbstractSyntaxElement): _PdfCipherParameter; /** * Return the DER bytes for the tbsCertificate (to-be-signed certificate). * * @private * @returns {Uint8Array} DER-encoded tbsCertificate bytes. */ _getTobeSignedCertificate(): Uint8Array; /** * Return the DER encoding for the entire certificate structure. * * @private * @returns {Uint8Array} DER-encoded certificate bytes. */ _getEncoded(): Uint8Array; /** * Alias for `_getEncoded` returning the encoded certificate bytes. * * @private * @returns {Uint8Array} DER-encoded certificate bytes. */ _getEncodedString(): Uint8Array; } /** * Simple container for a certificate and cached hash state. * * @private */ export declare class _PdfX509Certificates { /** * The contained X.509 certificate. * * @private * @type {_PdfX509Certificate} */ _certificate: _PdfX509Certificate; /** * Cached hash value for this certificate (implementation specific). * * @private * @type {number} */ _hashValue: number; /** * True when `_hashValue` has been computed and stored. * * @private * @type {boolean} */ _hashValueSet: boolean; constructor(certificates: _PdfX509Certificate); }