@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
30 lines (29 loc) • 1.17 kB
JavaScript
import { _decode_SignerInfo, _encode_SignerInfo, } from "../CryptographicMessageSyntax/SignerInfo.ta.mjs";
let _cached_decoder_for_Countersignature = null;
/**
* @summary Decodes an ASN.1 element into a(n) Countersignature
* @function
* @param {_Element} el The element being decoded.
* @returns {Countersignature} The decoded data structure.
*/
export function _decode_Countersignature(el) {
if (!_cached_decoder_for_Countersignature) {
_cached_decoder_for_Countersignature = _decode_SignerInfo;
}
return _cached_decoder_for_Countersignature(el);
}
let _cached_encoder_for_Countersignature = null;
/**
* @summary Encodes a(n) Countersignature 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 Countersignature, encoded as an ASN.1 Element.
*/
export function _encode_Countersignature(value, elGetter) {
if (!_cached_encoder_for_Countersignature) {
_cached_encoder_for_Countersignature = _encode_SignerInfo;
}
return _cached_encoder_for_Countersignature(value, elGetter);
}
/* eslint-enable */