@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
61 lines (60 loc) • 2 kB
TypeScript
import { INTEGER, OBJECT_IDENTIFIER } from "asn1-ts";
import * as $ from "asn1-ts/dist/node/functional";
import { Operations } from "../PKCS-15/Operations.ta";
export { compute_checksum, compute_signature, decipher, encipher, generate_key, hash, Operations, Operations_compute_checksum, Operations_compute_signature, Operations_decipher, Operations_encipher, Operations_generate_key, Operations_hash, Operations_verify_checksum, Operations_verify_signature, verify_checksum, verify_signature, _decode_Operations, _encode_Operations, } from "../PKCS-15/Operations.ta";
/**
* @summary PKCS15_ALGORITHM
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* PKCS15-ALGORITHM ::= CLASS {
* &id INTEGER UNIQUE,
* &Parameters,
* &Operations Operations,
* &objectIdentifier OBJECT IDENTIFIER OPTIONAL
* } WITH SYNTAX {
* PARAMETERS &Parameters
* OPERATIONS &Operations
* ID &id
* [OID &objectIdentifier]
* }
* ```
*
* @interface
*/
export interface PKCS15_ALGORITHM<Parameters = any> {
/**
* @summary A fixed string that can be used for external programs to determine the object class of this object.
*/
readonly class: "PKCS15-ALGORITHM";
/**
* @summary A map of type fields to their corresponding decoders.
*/
readonly decoderFor: Partial<{
[_K in keyof PKCS15_ALGORITHM<Parameters>]: $.ASN1Decoder<PKCS15_ALGORITHM<Parameters>[_K]>;
}>;
/**
* @summary A map of type fields to their corresponding encoders.
*/
readonly encoderFor: Partial<{
[_K in keyof PKCS15_ALGORITHM<Parameters>]: $.ASN1Encoder<PKCS15_ALGORITHM<Parameters>[_K]>;
}>;
/**
* @summary &id
*/
readonly "&id"?: INTEGER;
/**
* @summary &Parameters
*/
readonly "&Parameters": Parameters;
/**
* @summary &Operations
*/
readonly "&Operations"?: Operations;
/**
* @summary &objectIdentifier
*/
readonly "&objectIdentifier"?: OBJECT_IDENTIFIER;
}