@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
35 lines • 1.02 kB
text/typescript
import { ASN1Element as _Element, GeneralizedTime, UTCTime } from "@wildboar/asn1";
import * as $ from "@wildboar/asn1/functional";
/**
* @summary Time
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* Time ::= CHOICE {utcTime UTCTime,
* generalTime GeneralizedTime
* }
* ```
*/
export type Time = {
utcTime: UTCTime;
} | {
generalTime: GeneralizedTime;
};
/**
* @summary Decodes an ASN.1 element into a(n) Time
* @function
* @param {_Element} el The element being decoded.
* @returns {Time} The decoded data structure.
*/
export declare function _decode_Time(el: _Element): Time;
/**
* @summary Encodes a(n) Time 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 Time, encoded as an ASN.1 Element.
*/
export declare function _encode_Time(value: Time, elGetter: $.ASN1Encoder<Time>): _Element;
//# sourceMappingURL=Time.ta.d.mts.map