import { ASN1Element as _Element, BIT_STRING, INTEGER, OCTET_STRING, OPTIONAL, UTCTime } from "@wildboar/asn1"; import * as $ from "@wildboar/asn1/functional"; import { Validity } from "../AuthenticationFramework/Validity.ta.mjs"; import { Name } from "../InformationFramework/Name.ta.mjs"; import { Context_Data } from "../SpkmGssTokens/Context-Data.ta.mjs"; import { Key_Estb_Algs } from "../SpkmGssTokens/Key-Estb-Algs.ta.mjs"; import { Random_Integer } from "../SpkmGssTokens/Random-Integer.ta.mjs"; import type { Buffer } from "node:buffer"; /** * This is the `Buffer` equivalent of {@link SingleThreadUint8Array}. See it's * documentation for more details. * * Equivalent to `Buffer` before TypeScript 5.7, and `Buffer` in * TypeScript 5.7 and beyond. */ export type SingleThreadBuffer = ReturnType; /** * @summary Req_contents * @description * * ### ASN.1 Definition: * * ```asn1 * Req-contents ::= SEQUENCE { * tok-id INTEGER(256), -- shall contain 0100 (hex) * context-id Random-Integer, * pvno BIT STRING, * timestamp UTCTime OPTIONAL, -- mandatory for SPKM-2 * randSrc Random-Integer, * targ-name Name, * src-name [0] Name OPTIONAL, * req-data Context-Data, * validity [1] Validity OPTIONAL, * key-estb-set Key-Estb-Algs, * key-estb-req BIT STRING OPTIONAL, * key-src-bind OCTET STRING OPTIONAL * -- This field must be present for the case of SPKM-2 * -- unilateral authen. if the K-ALG in use does not provide * -- such a binding (but is optional for all other cases). * -- The octet string holds the result of applying the * -- mandatory hashing procedure (in MANDATORY I-ALG; * -- see Section 2.1) as follows: MD5(src || context_key), * -- where "src" is the DER-encoded octets of src-name, * -- "context-key" is the symmetric key (i.e., the * -- unprotected version of what is transmitted in * -- key-estb-req), and "||" is the concatenation operation. * } * ``` * */ export declare class Req_contents { /** * @summary `tok_id`. * @public * @readonly */ readonly tok_id: INTEGER; /** * @summary `context_id`. * @public * @readonly */ readonly context_id: Random_Integer; /** * @summary `pvno`. * @public * @readonly */ readonly pvno: BIT_STRING; /** * @summary `timestamp`. * @public * @readonly */ readonly timestamp: OPTIONAL; /** * @summary `randSrc`. * @public * @readonly */ readonly randSrc: Random_Integer; /** * @summary `targ_name`. * @public * @readonly */ readonly targ_name: Name; /** * @summary `src_name`. * @public * @readonly */ readonly src_name: OPTIONAL; /** * @summary `req_data`. * @public * @readonly */ readonly req_data: Context_Data; /** * @summary `validity`. * @public * @readonly */ readonly validity: OPTIONAL; /** * @summary `key_estb_set`. * @public * @readonly */ readonly key_estb_set: Key_Estb_Algs; /** * @summary `key_estb_req`. * @public * @readonly */ readonly key_estb_req?: OPTIONAL; /** * @summary `key_src_bind`. * @public * @readonly */ readonly key_src_bind?: OPTIONAL; /** * The original DER encoding */ originalDER: SingleThreadBuffer | null; constructor( /** * @summary `tok_id`. * @public * @readonly */ tok_id: INTEGER, /** * @summary `context_id`. * @public * @readonly */ context_id: Random_Integer, /** * @summary `pvno`. * @public * @readonly */ pvno: BIT_STRING, /** * @summary `timestamp`. * @public * @readonly */ timestamp: OPTIONAL, /** * @summary `randSrc`. * @public * @readonly */ randSrc: Random_Integer, /** * @summary `targ_name`. * @public * @readonly */ targ_name: Name, /** * @summary `src_name`. * @public * @readonly */ src_name: OPTIONAL, /** * @summary `req_data`. * @public * @readonly */ req_data: Context_Data, /** * @summary `validity`. * @public * @readonly */ validity: OPTIONAL, /** * @summary `key_estb_set`. * @public * @readonly */ key_estb_set: Key_Estb_Algs, /** * @summary `key_estb_req`. * @public * @readonly */ key_estb_req?: OPTIONAL, /** * @summary `key_src_bind`. * @public * @readonly */ key_src_bind?: OPTIONAL); /** * @summary Restructures an object into a Req_contents * @description * * This takes an `object` and converts it to a `Req_contents`. * * @public * @static * @method * @param {Object} _o An object having all of the keys and values of a `Req_contents`. * @returns {Req_contents} */ static _from_object(_o: { [_K in keyof Req_contents]: Req_contents[_K]; }): Req_contents; } /** * @summary The Leading Root Component Types of Req_contents * @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_Req_contents: $.ComponentSpec[]; /** * @summary The Trailing Root Component Types of Req_contents * @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_Req_contents: $.ComponentSpec[]; /** * @summary The Extension Addition Component Types of Req_contents * @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_Req_contents: $.ComponentSpec[]; /** * @summary Decodes an ASN.1 element into a(n) Req_contents * @function * @param {_Element} el The element being decoded. * @returns {Req_contents} The decoded data structure. */ export declare function _decode_Req_contents(el: _Element): Req_contents; /** * @summary Encodes a(n) Req_contents 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 Req_contents, encoded as an ASN.1 Element. */ export declare function _encode_Req_contents(value: Req_contents, elGetter: $.ASN1Encoder): _Element; //# sourceMappingURL=Req-contents.ta.d.mts.map