UNPKG

@wildboar/pc

Version:

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

122 lines (121 loc) 3.78 kB
import { OPTIONAL, UTF8String, ASN1Element as _Element } from "asn1-ts"; import * as $ from "asn1-ts/dist/node/functional"; import { AttributeStatus, _enum_for_AttributeStatus } from "../PlatformCertificateProfile/AttributeStatus.ta"; export { AttributeStatus, _enum_for_AttributeStatus, AttributeStatus_added, added, AttributeStatus_modified, modified, AttributeStatus_removed, removed, _decode_AttributeStatus, _encode_AttributeStatus } from "../PlatformCertificateProfile/AttributeStatus.ta"; /** * @summary Properties * @description * * ### ASN.1 Definition: * * ```asn1 * Properties ::= SEQUENCE { * propertyName UTF8String (SIZE (1..strmax)), * propertyValue UTF8String (SIZE (1..strmax)), * status [0] IMPLICIT AttributeStatus OPTIONAL } * ``` * * @class */ export declare class Properties { /** * @summary `propertyName`. * @public * @readonly */ readonly propertyName: UTF8String; /** * @summary `propertyValue`. * @public * @readonly */ readonly propertyValue: UTF8String; /** * @summary `status`. * @public * @readonly */ readonly status: OPTIONAL<AttributeStatus>; constructor( /** * @summary `propertyName`. * @public * @readonly */ propertyName: UTF8String, /** * @summary `propertyValue`. * @public * @readonly */ propertyValue: UTF8String, /** * @summary `status`. * @public * @readonly */ status: OPTIONAL<AttributeStatus>); /** * @summary Restructures an object into a Properties * @description * * This takes an `object` and converts it to a `Properties`. * * @public * @static * @method * @param {Object} _o An object having all of the keys and values of a `Properties`. * @returns {Properties} */ static _from_object(_o: { [_K in keyof (Properties)]: (Properties)[_K]; }): Properties; /** * @summary The enum used as the type of the component `status` * @public * @static */ static _enum_for_status: typeof _enum_for_AttributeStatus; } /** * @summary The Leading Root Component Types of Properties * @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_Properties: $.ComponentSpec[]; /** * @summary The Trailing Root Component Types of Properties * @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_Properties: $.ComponentSpec[]; /** * @summary The Extension Addition Component Types of Properties * @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_Properties: $.ComponentSpec[]; /** * @summary Decodes an ASN.1 element into a(n) Properties * @function * @param {_Element} el The element being decoded. * @returns {Properties} The decoded data structure. */ export declare function _decode_Properties(el: _Element): Properties; /** * @summary Encodes a(n) Properties 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 Properties, encoded as an ASN.1 Element. */ export declare function _encode_Properties(value: Properties, elGetter: $.ASN1Encoder<Properties>): _Element;