@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
82 lines • 3.26 kB
text/typescript
import { ASN1Element as _Element } from "@wildboar/asn1";
import * as $ from "@wildboar/asn1/functional";
import { GenericSecretKeyAttributes } from "../PKCS-15/GenericSecretKeyAttributes.ta.mjs";
import { OtherKey } from "../PKCS-15/OtherKey.ta.mjs";
import { SecretKeyObject } from "../PKCS-15/SecretKeyObject.ta.mjs";
/**
* @summary SecretKeyType
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* SecretKeyType ::= CHOICE {
* genericSecretKey SecretKeyObject {GenericSecretKeyAttributes},
* rc2key [0] SecretKeyObject {GenericSecretKeyAttributes},
* rc4key [1] SecretKeyObject {GenericSecretKeyAttributes},
* desKey [2] SecretKeyObject {GenericSecretKeyAttributes},
* des2Key [3] SecretKeyObject {GenericSecretKeyAttributes},
* des3Key [4] SecretKeyObject {GenericSecretKeyAttributes},
* castKey [5] SecretKeyObject {GenericSecretKeyAttributes},
* cast3Key [6] SecretKeyObject {GenericSecretKeyAttributes},
* cast128Key [7] SecretKeyObject {GenericSecretKeyAttributes},
* rc5Key [8] SecretKeyObject {GenericSecretKeyAttributes},
* ideaKey [9] SecretKeyObject {GenericSecretKeyAttributes},
* skipjackKey [10] SecretKeyObject {GenericSecretKeyAttributes},
* batonKey [11] SecretKeyObject {GenericSecretKeyAttributes},
* juniperKey [12] SecretKeyObject {GenericSecretKeyAttributes},
* rc6Key [13] SecretKeyObject {GenericSecretKeyAttributes},
* otherKey [14] OtherKey,
* ... -- For future extension
* }
* ```
*/
export type SecretKeyType = {
genericSecretKey: SecretKeyObject<GenericSecretKeyAttributes>;
} | {
rc2key: SecretKeyObject<GenericSecretKeyAttributes>;
} | {
rc4key: SecretKeyObject<GenericSecretKeyAttributes>;
} | {
desKey: SecretKeyObject<GenericSecretKeyAttributes>;
} | {
des2Key: SecretKeyObject<GenericSecretKeyAttributes>;
} | {
des3Key: SecretKeyObject<GenericSecretKeyAttributes>;
} | {
castKey: SecretKeyObject<GenericSecretKeyAttributes>;
} | {
cast3Key: SecretKeyObject<GenericSecretKeyAttributes>;
} | {
cast128Key: SecretKeyObject<GenericSecretKeyAttributes>;
} | {
rc5Key: SecretKeyObject<GenericSecretKeyAttributes>;
} | {
ideaKey: SecretKeyObject<GenericSecretKeyAttributes>;
} | {
skipjackKey: SecretKeyObject<GenericSecretKeyAttributes>;
} | {
batonKey: SecretKeyObject<GenericSecretKeyAttributes>;
} | {
juniperKey: SecretKeyObject<GenericSecretKeyAttributes>;
} | {
rc6Key: SecretKeyObject<GenericSecretKeyAttributes>;
} | {
otherKey: OtherKey;
} | _Element;
/**
* @summary Decodes an ASN.1 element into a(n) SecretKeyType
* @function
* @param {_Element} el The element being decoded.
* @returns {SecretKeyType} The decoded data structure.
*/
export declare function _decode_SecretKeyType(el: _Element): SecretKeyType;
/**
* @summary Encodes a(n) SecretKeyType 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 SecretKeyType, encoded as an ASN.1 Element.
*/
export declare function _encode_SecretKeyType(value: SecretKeyType, elGetter: $.ASN1Encoder<SecretKeyType>): _Element;
//# sourceMappingURL=SecretKeyType.ta.d.mts.map