/** * @license * Copyright (c) Peculiar Ventures, LLC. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ export interface IPemHeader { key: string; value: string; } /** * Represents PEM structure */ export interface IPemStruct { /** * Type */ type: string; /** * Headers */ headers: IPemHeader[]; /** * Decoded message data */ rawData: ArrayBuffer; } type TAtLeast = Partial & Pick; export type TPemStructEncodeParams = TAtLeast; /** * Represents PEM Converter. */ export declare class PemConverter { static CertificateTag: string; static CrlTag: string; static CertificateRequestTag: string; static AttributeCertificateTag: string; static isPem(data: string): boolean; static decodeWithHeaders(pem: string): IPemStruct[]; /** * Decodes PEM to a list of raws * @param pem message in PEM format */ static decode(pem: string): ArrayBuffer[]; /** * Encodes a list of raws in PEM format * @param raws A list of raws * @param tag PEM tag */ static encode(rawData: BufferSource | BufferSource[] | TPemStructEncodeParams[], tag?: string): string; /** * Encodes PEMStruct in PEM block * @param pem PEM structure for encoding * @returns Returns PEM encoded block */ private static encodeStruct; } export {};