@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
40 lines (39 loc) • 1.79 kB
TypeScript
import * as $ from "asn1-ts/dist/node/functional";
import { KeyInfo_paramsAndOps } from "../PKCS-15/KeyInfo-paramsAndOps.ta";
import { Reference } from "../PKCS-15/Reference.ta";
export { KeyInfo_paramsAndOps, _get_decoder_for_KeyInfo_paramsAndOps, _get_encoder_for_KeyInfo_paramsAndOps, } from "../PKCS-15/KeyInfo-paramsAndOps.ta";
export { Reference, _decode_Reference, _encode_Reference, } from "../PKCS-15/Reference.ta";
/**
* @summary KeyInfo
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* KeyInfo {ParameterType, OperationsType} ::= CHOICE {
* reference Reference,
* paramsAndOps SEQUENCE {
* parameters ParameterType,
* supportedOperations OperationsType OPTIONAL
* }
* }
* ```
*/
export declare type KeyInfo<ParameterType, OperationsType> = {
reference: Reference;
} | {
paramsAndOps: KeyInfo_paramsAndOps<ParameterType, OperationsType>;
};
/**
* @summary Returns a function that will decode an ASN.1 element into a(n) KeyInfo
* @function
* @param {_Element} el The element being decoded.
* @returns A function that will decode an ASN.1 element.
*/
export declare function _get_decoder_for_KeyInfo<ParameterType, OperationsType>(_decode_ParameterType: $.ASN1Decoder<ParameterType>, _decode_OperationsType: $.ASN1Decoder<OperationsType>): $.ASN1Decoder<KeyInfo<ParameterType, OperationsType>>;
/**
* @summary Returns a function that will encode a(n) KeyInfo into an ASN.1 Element.
* @function
* @returns A function that will encode a(n) KeyInfo as an ASN.1 element.
*/
export declare function _get_encoder_for_KeyInfo<ParameterType, OperationsType>(_encode_ParameterType: $.ASN1Encoder<ParameterType>, _encode_OperationsType: $.ASN1Encoder<OperationsType>): $.ASN1Encoder<KeyInfo<ParameterType, OperationsType>>;