@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
39 lines • 1.37 kB
text/typescript
import { ASN1Element as _Element } from "@wildboar/asn1";
import * as $ from "@wildboar/asn1/functional";
import { SubjectPublicKeyInfo } from "@wildboar/x500/AuthenticationFramework";
import { RSAPublicKey } from "../PKCS-1/RSAPublicKey.ta.mjs";
/**
* @summary RSAPublicKeyChoice
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* RSAPublicKeyChoice ::= CHOICE {
* raw RSAPublicKey,
* spki [1] SubjectPublicKeyInfo, -- See X.509. Must contain a public RSA key
* ...
* }
* ```
*/
export type RSAPublicKeyChoice = {
raw: RSAPublicKey;
} | {
spki: SubjectPublicKeyInfo;
} | _Element;
/**
* @summary Decodes an ASN.1 element into a(n) RSAPublicKeyChoice
* @function
* @param {_Element} el The element being decoded.
* @returns {RSAPublicKeyChoice} The decoded data structure.
*/
export declare function _decode_RSAPublicKeyChoice(el: _Element): RSAPublicKeyChoice;
/**
* @summary Encodes a(n) RSAPublicKeyChoice 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 RSAPublicKeyChoice, encoded as an ASN.1 Element.
*/
export declare function _encode_RSAPublicKeyChoice(value: RSAPublicKeyChoice, elGetter: $.ASN1Encoder<RSAPublicKeyChoice>): _Element;
//# sourceMappingURL=RSAPublicKeyChoice.ta.d.mts.map