@types/xml-encryption
TypeScript icon, indicating that this package has built-in type declarations

1.2.4 • Public • Published

Installation

npm install --save @types/xml-encryption

Summary

This package contains type definitions for xml-encryption (https://github.com/auth0/node-xml-encryption#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/xml-encryption.

index.d.ts

/// <reference types="node" />

export type Utf8AsciiBinaryEncoding = "utf8" | "ascii" | "binary";

export type KeyEncryptionAlgorithm =
    | "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
    | "http://www.w3.org/2001/04/xmlenc#rsa-1_5";

export type EncryptionAlgorithm =
    | "http://www.w3.org/2001/04/xmlenc#aes128-cbc"
    | "http://www.w3.org/2001/04/xmlenc#aes256-cbc"
    | "http://www.w3.org/2009/xmlenc11#aes128-gcm"
    | "http://www.w3.org/2009/xmlenc11#aes256-gcm"
    | "http://www.w3.org/2001/04/xmlenc#tripledes-cbc";

export interface EncryptOptions extends EncryptKeyOptions {
    encryptionAlgorithm: EncryptionAlgorithm;
    warnInsecureAlgorithm?: boolean | undefined;
    input_encoding?: Utf8AsciiBinaryEncoding | undefined;
}

export interface EncryptKeyOptions {
    rsa_pub: string | Buffer;
    pem: string | Buffer;
    keyEncryptionAlgorithm: KeyEncryptionAlgorithm;
    disallowEncryptionWithInsecureAlgorithm?: boolean | undefined;
}

export interface DecryptOptions {
    key: string | Buffer;
    disallowDecryptionWithInsecureAlgorithm?: boolean | undefined;
    warnInsecureAlgorithm?: boolean | undefined;
}

export function decrypt(
    xml: string,
    options: DecryptOptions,
    callback: (error: Error | null, result: string) => void,
): void;
export function decryptKeyInfo(doc: string, options: DecryptOptions): Buffer;
export function encrypt(
    content: string,
    options: EncryptOptions,
    callback: (error: Error, result: string) => void,
): void;
export function encryptKeyInfo(
    symmetricKey: string | Buffer,
    options: EncryptKeyOptions,
    callback: (error: Error | null, result: string) => void,
): void;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Chris Midgley.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.2.4171,059ts5.6
1.2.4171,059latest
1.2.4171,059ts4.5
1.2.4171,059ts4.6
1.2.4171,059ts4.7
1.2.4171,059ts4.8
1.2.4171,059ts4.9
1.2.4171,059ts5.0
1.2.4171,059ts5.1
1.2.4171,059ts5.2
1.2.4171,059ts5.3
1.2.4171,059ts5.4
1.2.4171,059ts5.5
1.2.4171,059ts5.7
1.2.134,165ts3.6
1.2.134,165ts3.7
1.2.134,165ts3.8
1.2.134,165ts3.9
1.2.134,165ts4.0
1.2.134,165ts4.1
1.2.134,165ts4.2
1.2.212,233ts4.3
1.2.212,233ts4.4
1.2.05ts3.3
1.2.05ts3.4
1.2.05ts3.5

Version History

VersionDownloads (Last 7 Days)Published
1.2.4171,059
1.2.31,529
1.2.212,233
1.2.134,165
1.2.05

Package Sidebar

Install

npm i @types/xml-encryption

Weekly Downloads

218,991

Version

1.2.4

License

MIT

Unpacked Size

6.02 kB

Total Files

5

Last publish

Collaborators

  • types