# rsa-encrypt.js

> RSA for browser with small code size

Latest version **1.0.2** (published 2018-03-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install rsa-encrypt.js
pnpm add rsa-encrypt.js
yarn add rsa-encrypt.js
bun add rsa-encrypt.js
```

## 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.2 |
| Published | 2018-03-27 |
| First published | 2018-03-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 60.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | meowtec |

## Links

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

## Recent versions

- 1.0.2 (latest) — 2018-03-27
- 1.0.1 — 2018-03-20
- 1.0.0 — 2018-03-20

## README

```javascript
import RSA from 'rsa-encrypt.js'

const publicKey = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsBL2UopSOdcuujSuGuC4s+2BDala2MTbdNVKmXHSYN4ara3lnp+SpbgeSkD11xoCIOAOsUIXCd8sBTDuo3pN8+Jn9Ce9jIutMDx5E5umGxY2LoOq9JfKMJ3UKFsj87l0oPyJiqnvDA6ypMFbcWr27ys0/fQy/9JNBoAJpL32yvJvTFecl36KLGm8sow4+dqKaoRpEHgg49Amc6DXitC/wdFWUebHbOYIiRgapnl8wokxeYrGAJOL8E2xbogCDs1O4Q15REMaApJzbcMSo34RJgF2ioGkiih3Q8NEl6+9cMDS42fimWoPqnLvNjz3kCUtzB/fv0qIRubrr0Xqw1jfuwIDAQAB'
const rsa = new RSA(publicKey)

// set a new public key:
// rsa.setPublicKey('')

const encryptedString = rsa.encrypt('password123')
if (encryptedString) {
  console.log(encryptedString)
} else {
  console.error(rsa.error)
}
```

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