UNPKG

libas2

Version:

Implementation of the AS2 protocol as presented in RFC 4130 and related RFCs

29 lines (28 loc) 1.12 kB
/// <reference types="node" /> import { PemFile } from './PemFile'; export declare type AS2Signing = 'sha-1' | 'sha-256' | 'sha-384' | 'sha-512'; export declare type AS2Encryption = 'des-EDE3-CBC' | 'aes128-CBC' | 'aes192-CBC' | 'aes256-CBC' | 'aes128-GCM' | 'aes192-GCM' | 'aes256-GCM'; export interface EncryptionOptions { /** PEM-based public certificate contents. */ cert: string | Buffer | PemFile; /** A valid type of encryption. */ encryption: AS2Encryption; } export interface DecryptionOptions { /** PEM-based public certificate contents. */ cert: string | Buffer | PemFile; /** PEM-based private certificate contents. */ key: string | Buffer | PemFile; } export interface SigningOptions { /** PEM-based public certificate contents. */ cert: string | Buffer | PemFile; /** PEM-based private certificate contents. */ key: string | Buffer | PemFile; /** Algorithm of secure signature hash to use. */ algorithm?: AS2Signing; } export interface VerificationOptions { /** PEM-based public certificate contents. */ cert: string | Buffer | PemFile; }