UNPKG

@wildboar/pkcs

Version:
31 lines (30 loc) 1.21 kB
import { OCTET_STRING } from "asn1-ts"; import * as $ from "asn1-ts/dist/node/functional"; /** * @summary ENCRYPTED * @description * * ### ASN.1 Definition: * * ```asn1 * ENCRYPTED{ToBeEnciphered} ::= * OCTET STRING * (CONSTRAINED BY { * -- must be the result of applying an encipherment procedure to the contents octets component * -- of a definite-length BER-encoding of a value of --ToBeEnciphered}) * ``` */ export declare type ENCRYPTED<ToBeEnciphered> = OCTET_STRING; /** * @summary Returns a function that will decode an ASN.1 element into a(n) ENCRYPTED * @function * @param {_Element} el The element being decoded. * @returns A function that will decode an ASN.1 element. */ export declare function _get_decoder_for_ENCRYPTED<ToBeEnciphered>(_decode_ToBeEnciphered: $.ASN1Decoder<ToBeEnciphered>): $.ASN1Decoder<Uint8Array>; /** * @summary Returns a function that will encode a(n) ENCRYPTED into an ASN.1 Element. * @function * @returns A function that will encode a(n) ENCRYPTED as an ASN.1 element. */ export declare function _get_encoder_for_ENCRYPTED<ToBeEnciphered>(_encode_ToBeEnciphered: $.ASN1Encoder<ToBeEnciphered>): $.ASN1Encoder<Uint8Array>;