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

1.2.5 • Public • Published

Installation

npm install --save @types/rasha

Summary

This package contains type definitions for rasha (https://git.coolaj86.com/coolaj86/rasha.js).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rasha.

index.d.ts

export as namespace Rasha;

export interface Jwk {
    kty: "RSA";
    n: string;
    e: string;
    d: string;
    p: string;
    q: string;
    dp: string;
    dq: string;
    qi: string;
}

export interface GenerateOptions {
    format: string;
    encoding?: string | undefined;
    modulusLength?: number | undefined;
    publicExponent?: number | undefined;
}

export interface ImportOptions {
    pem: string;
    public: boolean;
}

export interface ExportOptions {
    jwk: Jwk;
    format: string;
    public: boolean;
}

export interface RsaKeys {
    private: string;
    public: string;
}

// Generate RSA KEY
export function generate(opts: GenerateOptions): Promise<RsaKeys>;

// PEM-to-JWK
declare function Import(opts: ImportOptions): Promise<Jwk>;
export { Import as import };

// JWK-to-PEM
declare function Export(opts: ExportOptions): Promise<string>;
export { Export as export };

// JWK Thumbprint
export function thumbprint(jwk: Jwk): Promise<any>;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Justin Baroux.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/rasha

Weekly Downloads

5,998

Version

1.2.5

License

MIT

Unpacked Size

4.45 kB

Total Files

5

Last publish

Collaborators

  • types