@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
158 lines • 4.88 kB
text/typescript
import { ASN1Element as _Element, INTEGER, OPTIONAL } from "@wildboar/asn1";
import * as $ from "@wildboar/asn1/functional";
import { AccessControlRule } from "../PKCS-15/AccessControlRule.ta.mjs";
import { CommonObjectFlags } from "../PKCS-15/CommonObjectFlags.ta.mjs";
import { Identifier } from "../PKCS-15/Identifier.ta.mjs";
import { Label } from "../PKCS-15/Label.ta.mjs";
/**
* @summary CommonObjectAttributes
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* CommonObjectAttributes ::= SEQUENCE {
* label Label OPTIONAL,
* flags CommonObjectFlags OPTIONAL,
* authId Identifier OPTIONAL,
* ...,
* userConsent INTEGER (1..pkcs15-ub-userConsent) OPTIONAL,
* accessControlRules SEQUENCE SIZE (1..MAX) OF AccessControlRule OPTIONAL
* } (CONSTRAINED BY {-- authId should be present in the IC card case if flags.private is set.
* -- It must equal an authID in one AuthRecord in the AODF -- })
* ```
*
*/
export declare class CommonObjectAttributes {
/**
* @summary `label`.
* @public
* @readonly
*/
readonly label?: OPTIONAL<Label>;
/**
* @summary `flags`.
* @public
* @readonly
*/
readonly flags?: OPTIONAL<CommonObjectFlags>;
/**
* @summary `authId`.
* @public
* @readonly
*/
readonly authId?: OPTIONAL<Identifier>;
/**
* @summary `userConsent`.
* @public
* @readonly
*/
readonly userConsent?: OPTIONAL<INTEGER>;
/**
* @summary `accessControlRules`.
* @public
* @readonly
*/
readonly accessControlRules?: OPTIONAL<AccessControlRule[]>;
/**
* @summary Extensions that are not recognized.
* @public
* @readonly
*/
readonly _unrecognizedExtensionsList: _Element[];
constructor(
/**
* @summary `label`.
* @public
* @readonly
*/
label?: OPTIONAL<Label>,
/**
* @summary `flags`.
* @public
* @readonly
*/
flags?: OPTIONAL<CommonObjectFlags>,
/**
* @summary `authId`.
* @public
* @readonly
*/
authId?: OPTIONAL<Identifier>,
/**
* @summary `userConsent`.
* @public
* @readonly
*/
userConsent?: OPTIONAL<INTEGER>,
/**
* @summary `accessControlRules`.
* @public
* @readonly
*/
accessControlRules?: OPTIONAL<AccessControlRule[]>,
/**
* @summary Extensions that are not recognized.
* @public
* @readonly
*/
_unrecognizedExtensionsList?: _Element[]);
/**
* @summary Restructures an object into a CommonObjectAttributes
* @description
*
* This takes an `object` and converts it to a `CommonObjectAttributes`.
*
* @public
* @static
* @method
* @param {Object} _o An object having all of the keys and values of a `CommonObjectAttributes`.
* @returns {CommonObjectAttributes}
*/
static _from_object(_o: {
[_K in keyof CommonObjectAttributes]: CommonObjectAttributes[_K];
}): CommonObjectAttributes;
}
/**
* @summary The Leading Root Component Types of CommonObjectAttributes
* @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_CommonObjectAttributes: $.ComponentSpec[];
/**
* @summary The Trailing Root Component Types of CommonObjectAttributes
* @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_CommonObjectAttributes: $.ComponentSpec[];
/**
* @summary The Extension Addition Component Types of CommonObjectAttributes
* @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_CommonObjectAttributes: $.ComponentSpec[];
/**
* @summary Decodes an ASN.1 element into a(n) CommonObjectAttributes
* @function
* @param {_Element} el The element being decoded.
* @returns {CommonObjectAttributes} The decoded data structure.
*/
export declare function _decode_CommonObjectAttributes(el: _Element): CommonObjectAttributes;
/**
* @summary Encodes a(n) CommonObjectAttributes into an ASN.1 Element.
* @function
* @param value The element being encoded.
* @param elGetter A function that can be used to get new ASN.1 elements.
* @returns {_Element} The CommonObjectAttributes, encoded as an ASN.1 Element.
*/
export declare function _encode_CommonObjectAttributes(value: CommonObjectAttributes, elGetter: $.ASN1Encoder<CommonObjectAttributes>): _Element;
//# sourceMappingURL=CommonObjectAttributes.ta.d.mts.map