@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
39 lines (38 loc) • 1.34 kB
TypeScript
import { ASN1Element as _Element, GeneralizedTime } from "asn1-ts";
import * as $ from "asn1-ts/dist/node/functional";
import { ReferencedValue } from "../PKCS-15/ReferencedValue.ta";
export { ReferencedValue, _get_decoder_for_ReferencedValue, _get_encoder_for_ReferencedValue, } from "../PKCS-15/ReferencedValue.ta";
/**
* @summary LastUpdate
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* LastUpdate ::= CHOICE {
* generalizedTime GeneralizedTime,
* referencedTime ReferencedValue {GeneralizedTime},
* ...
* }
* ```
*/
export declare type LastUpdate = {
generalizedTime: GeneralizedTime;
} | {
referencedTime: ReferencedValue<GeneralizedTime>;
} | _Element;
/**
* @summary Decodes an ASN.1 element into a(n) LastUpdate
* @function
* @param {_Element} el The element being decoded.
* @returns {LastUpdate} The decoded data structure.
*/
export declare function _decode_LastUpdate(el: _Element): LastUpdate;
/**
* @summary Encodes a(n) LastUpdate 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 LastUpdate, encoded as an ASN.1 Element.
*/
export declare function _encode_LastUpdate(value: LastUpdate, elGetter: $.ASN1Encoder<LastUpdate>): _Element;