# @types/rasha

> TypeScript definitions for rasha

Latest version **1.2.5** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/rasha
pnpm add @types/rasha
yarn add @types/rasha
bun add @types/rasha
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.2.5 |
| Published | 2023-11-07 |
| First published | 2019-03-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51441 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/rasha
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rasha
- npm.io page: https://npm.io/package/@types/rasha

## Recent versions

- 1.2.5 (latest) — 2023-11-07
- 1.2.3 (ts3.6) — 2021-07-08
- 1.2.2 (ts3.5) — 2021-03-25
- 1.2.1 (ts3.1) — 2020-08-23
- 1.2.0 (ts2.0) — 2019-03-29
- 1.2.4 — 2023-10-18

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rasha/index.d.ts)
````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](https://github.com/Just1B).

---
_Source: https://npm.io/package/@types/rasha · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
