/** * @license * Copyright 2022-2024 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { UnexpectedDataError } from "../MatterError.js"; export declare enum DerKey { ObjectId = "_objectId", TagId = "_tag", Bytes = "_bytes", Elements = "_elements", BitsPadding = "_padding", TypeOverride = "_type", RawData = "_raw" } export declare class DerError extends UnexpectedDataError { } export declare enum DerType { Boolean = 1, Integer = 2, BitString = 3, OctetString = 4, Null = 5, ObjectIdentifier = 6, UTF8String = 12, Sequence = 16, Set = 17, PrintableString = 19, T16String = 20, IA5String = 22, UtcDate = 23, GeneralizedTime = 24 } export declare const ObjectId: (objectId: string) => { _tag: number; _bytes: Uint8Array; }; export declare const DerObject: (objectId: string, content?: any) => any; export declare const BitByteArray: (data: Uint8Array, padding?: number) => { _tag: number; _bytes: Uint8Array; _padding: number; }; export declare const ContextTagged: (tagId: number, value?: any) => { _tag: number; _bytes: Uint8Array; }; export declare const ContextTaggedBytes: (tagId: number, value: Uint8Array) => { _tag: number; _bytes: Uint8Array; }; export declare const DatatypeOverride: (type: DerType, value: any) => { _type: DerType; _raw: any; }; export declare const RawBytes: (bytes: Uint8Array) => { _bytes: Uint8Array; }; export type DerNode = { [DerKey.TagId]: number; [DerKey.Bytes]: Uint8Array; [DerKey.Elements]?: DerNode[]; [DerKey.BitsPadding]?: number; }; export declare class DerCodec { static encode(value: any): Uint8Array; private static encodeDate; private static encodeBoolean; private static encodeArray; private static encodeOctetString; private static encodeObject; private static encodeString; private static encodePrintableString; private static encodeIA5String; private static encodeInteger; private static encodeBitString; private static encodeLengthBytes; private static encodeAsn1; static decode(data: Uint8Array): DerNode; private static decodeRec; private static decodeAsn1; } //# sourceMappingURL=DerCodec.d.ts.map