UNPKG

@wildboar/pc

Version:

Trusted Computing Group Platform Certificate ASN.1 data structures in TypeScript

103 lines (102 loc) 3.23 kB
import { UTF8String, ASN1Element as _Element } from "asn1-ts"; import * as $ from "asn1-ts/dist/node/functional"; import { AddressType } from "../PlatformCertificateProfile/AddressType.ta"; export { AddressType, _decode_AddressType, _encode_AddressType } from "../PlatformCertificateProfile/AddressType.ta"; /** * @summary ComponentAddress * @description * * ### ASN.1 Definition: * * ```asn1 * ComponentAddress ::= SEQUENCE { * addressType AddressType, * addressValue UTF8String (SIZE (1..strmax)) } * ``` * * @class */ export declare class ComponentAddress { /** * @summary `addressType`. * @public * @readonly */ readonly addressType: AddressType; /** * @summary `addressValue`. * @public * @readonly */ readonly addressValue: UTF8String; constructor( /** * @summary `addressType`. * @public * @readonly */ addressType: AddressType, /** * @summary `addressValue`. * @public * @readonly */ addressValue: UTF8String); /** * @summary Restructures an object into a ComponentAddress * @description * * This takes an `object` and converts it to a `ComponentAddress`. * * @public * @static * @method * @param {Object} _o An object having all of the keys and values of a `ComponentAddress`. * @returns {ComponentAddress} */ static _from_object(_o: { [_K in keyof (ComponentAddress)]: (ComponentAddress)[_K]; }): ComponentAddress; } /** * @summary The Leading Root Component Types of ComponentAddress * @description * * This is an array of `ComponentSpec`s that define how to decode the leading root component type list of a SET or SEQUENCE. * * @constant */ export declare const _root_component_type_list_1_spec_for_ComponentAddress: $.ComponentSpec[]; /** * @summary The Trailing Root Component Types of ComponentAddress * @description * * This is an array of `ComponentSpec`s that define how to decode the trailing root component type list of a SET or SEQUENCE. * * @constant */ export declare const _root_component_type_list_2_spec_for_ComponentAddress: $.ComponentSpec[]; /** * @summary The Extension Addition Component Types of ComponentAddress * @description * * This is an array of `ComponentSpec`s that define how to decode the extension addition component type list of a SET or SEQUENCE. * * @constant */ export declare const _extension_additions_list_spec_for_ComponentAddress: $.ComponentSpec[]; /** * @summary Decodes an ASN.1 element into a(n) ComponentAddress * @function * @param {_Element} el The element being decoded. * @returns {ComponentAddress} The decoded data structure. */ export declare function _decode_ComponentAddress(el: _Element): ComponentAddress; /** * @summary Encodes a(n) ComponentAddress into an ASN.1 Element. * @function * @param {value} el The element being decoded. * @param elGetter A function that can be used to get new ASN.1 elements. * @returns {_Element} The ComponentAddress, encoded as an ASN.1 Element. */ export declare function _encode_ComponentAddress(value: ComponentAddress, elGetter: $.ASN1Encoder<ComponentAddress>): _Element;