@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
33 lines (32 loc) • 2.04 kB
TypeScript
import { ASN1Element as _Element } from "asn1-ts";
import * as $ from "asn1-ts/dist/node/functional";
import { CommonKeyAttributes } from "../PKCS-15/CommonKeyAttributes.ta";
import { CommonSecretKeyAttributes } from "../PKCS-15/CommonSecretKeyAttributes.ta";
import { PKCS15Object } from "../PKCS-15/PKCS15Object.ta";
export { CommonKeyAttributes, _decode_CommonKeyAttributes, _encode_CommonKeyAttributes, } from "../PKCS-15/CommonKeyAttributes.ta";
export { CommonSecretKeyAttributes, _decode_CommonSecretKeyAttributes, _encode_CommonSecretKeyAttributes, } from "../PKCS-15/CommonSecretKeyAttributes.ta";
export { PKCS15Object, _get_decoder_for_PKCS15Object, _get_encoder_for_PKCS15Object, } from "../PKCS-15/PKCS15Object.ta";
/**
* @summary SecretKeyObject
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* SecretKeyObject {KeyAttributes} ::= PKCS15Object { CommonKeyAttributes, CommonSecretKeyAttributes, KeyAttributes}
* ```
*/
export declare type SecretKeyObject<KeyAttributes> = PKCS15Object<CommonKeyAttributes, CommonSecretKeyAttributes, KeyAttributes>;
/**
* @summary Returns a function that will decode an ASN.1 element into a(n) SecretKeyObject
* @function
* @param {_Element} el The element being decoded.
* @returns A function that will decode an ASN.1 element.
*/
export declare function _get_decoder_for_SecretKeyObject<KeyAttributes>(_decode_KeyAttributes: $.ASN1Decoder<KeyAttributes>): (el: _Element) => PKCS15Object<CommonKeyAttributes, CommonSecretKeyAttributes, KeyAttributes>;
/**
* @summary Returns a function that will encode a(n) SecretKeyObject into an ASN.1 Element.
* @function
* @returns A function that will encode a(n) SecretKeyObject as an ASN.1 element.
*/
export declare function _get_encoder_for_SecretKeyObject<KeyAttributes>(_encode_KeyAttributes: $.ASN1Encoder<KeyAttributes>): (value: PKCS15Object<CommonKeyAttributes, CommonSecretKeyAttributes, KeyAttributes>, elGetter: $.ASN1Encoder<PKCS15Object<CommonKeyAttributes, CommonSecretKeyAttributes, KeyAttributes>>) => _Element;