{"id":20020171,"url":"https://github.com/wonism/rsa-light","last_synced_at":"2026-06-06T18:31:45.479Z","repository":{"id":94612838,"uuid":"351745854","full_name":"wonism/rsa-light","owner":"wonism","description":"RSA library that works on browser and node without any dependencies.","archived":false,"fork":false,"pushed_at":"2021-03-26T11:36:49.000Z","size":144,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-12T16:11:26.594Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wonism.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-26T10:35:51.000Z","updated_at":"2023-03-10T08:23:35.000Z","dependencies_parsed_at":"2023-03-15T07:30:21.806Z","dependency_job_id":null,"html_url":"https://github.com/wonism/rsa-light","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wonism%2Frsa-light","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wonism%2Frsa-light/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wonism%2Frsa-light/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wonism%2Frsa-light/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wonism","download_url":"https://codeload.github.com/wonism/rsa-light/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241454127,"owners_count":19965308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T08:30:08.522Z","updated_at":"2026-06-06T18:31:45.447Z","avatar_url":"https://github.com/wonism.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RSA Light\n\n![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/wonism/rsa-light/test-release/main)\n![npm](https://img.shields.io/npm/v/rsa-light)\n![npm bundle size](https://img.shields.io/bundlephobia/min/rsa-light)\n\nRSA library that works on browser and node without any dependencies.\n\n## Installation\n\n```sh\n# npm\n$ npm i -S rsa-light\n# yarn\n$ yarn add rsa-light\n```\n## Usage\n\n```ts\n// without signature\nimport RSA from 'rsa-light';\n\nconst rsaKey = RSA.generateRSAKey(512);\nconst publicKeyString = RSA.publicKeyString(rsaKey);\n\nconst encryptionResult = RSA.encrypt('Some Plain Text', publicKeyString);\nconst decryptionResult = RSA.decrypt(encryptionResult, rsaKey);\n\nconsole.log(decryptionResult.plainText);\nconsole.log(decryptionResult.signature);\n```\n\n```ts\n// with signature\nimport RSA from 'rsa-light';\n\nconst rsaKey = RSA.generateRSAKey(512);\nconst publicKeyString = RSA.publicKeyString(rsaKey);\n\nconst signature = RSA.generateRSAKey(512);\n\nconst encryptionResult = RSA.encrypt('Some Plain Text', publicKeyString, signature);\nconst publicKeyId = RSA.publicKeyId(RSA.publicKeyString(signature));\nconst decryptionResult = RSA.decrypt(encryptionResult, rsaKey);\n\nconsole.log(publicKeyId);\nconsole.log(decryptionResult.plainText);\nconsole.log(decryptionResult.signature);\nconsole.log(decryptionResult.publicKey);\nconsole.log(RSA.publicKeyString(signature));\nconsole.log(RSA.publicKeyId(decryptionResult.publicKey));\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwonism%2Frsa-light","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwonism%2Frsa-light","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwonism%2Frsa-light/lists"}