# rsa-cmdw

> rsa for cmdw

Latest version **1.0.0** (published 2019-07-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install rsa-cmdw
pnpm add rsa-cmdw
yarn add rsa-cmdw
bun add rsa-cmdw
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-07-05 |
| First published | 2019-07-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 23.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | populee |
| Maintainers | populee |

## Links

- npm: https://www.npmjs.com/package/rsa-cmdw
- npm.io page: https://npm.io/package/rsa-cmdw

## Recent versions

- 1.0.0 (latest) — 2019-07-05

## README

# rsa-cmdw
rsa-cmdw
# NPM 下载包
npm i rsa-cmdw --save-dev
# js使用 （加密）
```javascript
const { RSA, BASE64 } = require('rsa-cmdw');
const RSAAPP = {
    NoPadding: "NoPadding",
    PKCS1Padding: "PKCS1Padding",
    RawEncoding: "RawEncoding",
    NumericEncoding: "NumericEncoding",
};
const userId = '2222';
const pwd = '33333';
const e = "010001";
const m = "0082647e932d96dab18bae257f463abfa351438184585128eb223c2b400ed8f0ec3396cc4da111158879525e03b3931f039b361a0b97ef6c7c12d6389efc37a034d446925337333decb2d1f4e33b83eacd05a2243ced02d5b8966770d934bb999d7036d4bf50895675c144421edf68b9cceafbd11bef67f1aadf9db058ff457ebd";
RSA.setMaxDigits(262);
const key = new RSA.RSAKeyPair(e, "", m, 1024);
const useridtext = BASE64.base64_encode(RSA.encryptedString(key, userId, RSAAPP.PKCS1Padding, RSAAPP.RawEncoding));
const pwdtext = BASE64.base64_encode(RSA.encryptedString(key, pwd, RSAAPP.PKCS1Padding, RSAAPP.RawEncoding));
console.log(useridtext);
console.log(pwdtext);

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