UNPKG

@shockpkg/ria-packager

Version:

Package for creating Adobe AIR packages

66 lines (65 loc) 1.85 kB
import { SecurityCertificateX509 } from '../certificate/x509.ts'; import { SecurityKeyPrivateRsa } from '../key/private/rsa.ts'; import { SecurityKeystore } from '../keystore.ts'; /** * SecurityKeystorePkcs12 object. */ export declare class SecurityKeystorePkcs12 extends SecurityKeystore { /** * Certificate. */ protected _certificate: SecurityCertificateX509 | null; /** * Private key. */ protected _privateKey: SecurityKeyPrivateRsa | null; /** * SecurityKeystorePkcs12 constructor. */ constructor(); /** * Reset the internal state. */ reset(): void; /** * Get certificate or throw if none. * * @returns Certificate instance. */ getCertificate(): SecurityCertificateX509; /** * Get private key or throw if none. * * @returns Private key instance. */ getPrivateKey(): SecurityKeyPrivateRsa; /** * Decode from file data. * * @param data File data. * @param password The password if necessary. */ decode(data: Readonly<Uint8Array>, password?: string | null): void; /** * Create CertificateX509. * * @param certificate X509 certificate in PEM format. * @returns New CertificateX509. */ protected _createCertificateX509(certificate: string): SecurityCertificateX509; /** * Create KeyPrivateRsa. * * @param privateKey RSA private key in PEM format. * @returns New KeyPrivateRsa. */ protected _createSecurityKeyPrivateRsa(privateKey: string): SecurityKeyPrivateRsa; /** * Create from file data. * * @param data File data. * @param password The password if necessary. * @returns New instance. */ static decode(data: Readonly<Uint8Array>, password?: string | null): SecurityKeystorePkcs12; }