{"id":26499684,"url":"https://github.com/akanass/nestjsx-crypto","last_synced_at":"2025-10-11T21:02:18.564Z","repository":{"id":35109858,"uuid":"204927578","full_name":"akanass/nestjsx-crypto","owner":"akanass","description":"NestJS module to provide some functions for security features like AES key, Key pair, RSA key, PKCS12, Certificate, PEM and more","archived":false,"fork":false,"pushed_at":"2023-03-08T03:06:00.000Z","size":398,"stargazers_count":11,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-20T04:47:47.954Z","etag":null,"topics":["aes","crypto","jwt","nestjs","nestjsx-crypto","observable","openssl","pem","rsa","rxjs7"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akanass.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-08-28T12:33:37.000Z","updated_at":"2023-11-27T22:02:24.000Z","dependencies_parsed_at":"2023-09-28T08:34:35.866Z","dependency_job_id":null,"html_url":"https://github.com/akanass/nestjsx-crypto","commit_stats":{"total_commits":17,"total_committers":1,"mean_commits":17.0,"dds":0.0,"last_synced_commit":"800005102ef6c09854046f2267dc0a2c8520331e"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akanass%2Fnestjsx-crypto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akanass%2Fnestjsx-crypto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akanass%2Fnestjsx-crypto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akanass%2Fnestjsx-crypto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akanass","download_url":"https://codeload.github.com/akanass/nestjsx-crypto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244570995,"owners_count":20474160,"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":["aes","crypto","jwt","nestjs","nestjsx-crypto","observable","openssl","pem","rsa","rxjs7"],"created_at":"2025-03-20T15:18:29.522Z","updated_at":"2025-10-11T21:02:18.500Z","avatar_url":"https://github.com/akanass.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv style=\"margin-bottom:20px;\"\u003e\n\u003cdiv\u003e\n    \u003ca href=\"https://www.typescriptlang.org/docs/tutorial.html\"\u003e\n        \u003cimg src=\"https://cdn-images-1.medium.com/max/800/1*8lKzkDJVWuVbqumysxMRYw.png\"\n             align=\"right\" alt=\"Typescript logo\" width=\"50\" height=\"50\" style=\"border:none;\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"http://reactivex.io/rxjs\"\u003e\n        \u003cimg src=\"http://reactivex.io/assets/Rx_Logo_S.png\"\n             align=\"right\" alt=\"ReactiveX logo\" width=\"50\" height=\"50\" style=\"border:none;\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://nestjs.com/\" target=\"blank\"\u003e\n        \u003cimg src=\"https://nestjs.com/img/logo_text.svg\" height=\"50\" alt=\"Nest Logo\" align=\"right\" style=\"border:none;\" /\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\n# NestJSX-Crypto\n\n`Crypto` module for [NestJS](https://nestjs.com/) framework provides some functions for security features like `AES key`, `Key pair`, `PKCS12`, `RSA key`, `Certificate`, `JWT` and more.\n\nThis module is a wrapper to use [@akanass-rx-crypto](https://github.com/akanass/rx-crypto) library inside [NestJS](https://nestjs.com/) `application` in an easy way.\n\n**All most important crypto features in only one module.**\n\n## Table of contents\n\n* [Using crypto module inside NestJS application](#using-crypto-module-inside-nestjs-application)\n    * [Yarn or NPM it in your package.json](#yarn-or-npm-it-in-your-packagejson)\n    * [Import CryptoModule](#import-cryptomodule)\n    * [Use it anywhere](#use-it-anywhere)\n* [API in Detail](#api-in-detail)\n* [Contributing](#contributing)\n* [Change History](#change-history)\n* [Maintainers](#maintainers)\n* [License](#license)\n\n## Using crypto module inside NestJS application\n\n### `yarn` or `npm` it in your `package.json`\n\n```bash\n$ npm install --save @akanass/nestjsx-crypto @nestjs/common rxjs reflect-metadata\n\nor\n\n$ yarn add @akanass/nestjsx-crypto @nestjs/common rxjs reflect-metadata\n```\n\n```javascript\n\"dependencies\": {\n    \"@akanass/nestjsx-crypto\": \"^3.0.0\",\n    \"@nestjs/common\": \"^8.0.11\",\n    \"reflect-metadata\": \"^0.1.13\",\n    \"rxjs\": \"^7.4.0\"\n    //...\n}\n//...\n```\n\n### import `CryptoModule`\n\n```typescript\nimport { CryptoModule } from '@akanass/nestjsx-crypto';\nimport { Module } from '@nestjs/common';\nimport { NestJSServiceWithCrypto } from './crypto.service.ts';\n\n@Module({\n    imports: [\n        CryptoModule\n    ],\n    providers: [\n        NestJSServiceWithCrypto\n    ]\n})\nexport class NestJSModuleNeedsCryptoModule {}\n```\n\n### use it anywhere\n\nYou can use `AesService`, `HashService`, `PemService`, `RandomStringService`, `JwtService` and `RsaService` anywhere in your module with **dependency injection**.\n\n```typescript\nimport { RsaService, NodeRSA } from '@akanass/nestjsx-crypto';\nimport { Injectable } from '@nestjs/common';\n\n@Injectable()\nexport class NestJSServiceWithCrypto {\n    constructor(private readonly _rsaService: RsaService) {}\n    \n    createRsaKey(): void {\n        this._rsaService.createKey().subscribe(\n            (k: NodeRSA) =\u003e console.log(k), // Show NodeRSA instance in console\n            e =\u003e console.error(e) // Show error in console\n        );\n    }\n}\n```\n\n[Back to top](#table-of-contents)\n\n## API in Detail\n\nWe implemented some services and to see their details go to documentation folder:\n\n* [./documentation/AesService.md](https://github.com/akanass/nestjsx-crypto/blob/master/documentation/AesService.md)\n* [./documentation/HashService.md](https://github.com/akanass/nestjsx-crypto/blob/master/documentation/HashService.md)\n* [./documentation/JwtService.md](https://github.com/akanass/nestjsx-crypto/blob/master/documentation/JwtService.md)\n* [./documentation/PemService.md](https://github.com/akanass/nestjsx-crypto/blob/master/documentation/PemService.md)\n* [./documentation/RandomStringService.md](https://github.com/akanass/nestjsx-crypto/blob/master/documentation/RandomStringService.md)\n* [./documentation/RsaService.md](https://github.com/akanass/nestjsx-crypto/blob/master/documentation/RsaService.md)\n\n[Back to top](#table-of-contents)\n\n## Contributing\n\nTo set up your development environment:\n\n1. clone the repo to your workspace,\n2. in the shell `cd` to the main folder,\n3. hit `npm or yarn install`,\n4. run `npm or yarn run test`.\n    * It will lint the code and execute all tests. \n    * The test coverage report can be viewed from `./coverage/lcov-report/index.html`.\n\n[Back to top](#table-of-contents)\n\n## Change History\n* v4.0.0 (2022-07-11)\n    * Update packages' versions\n    * Latest `nestjs` version `9.0.2`\n* v3.0.0 (2021-10-08)\n    * Update packages' versions\n    * Latest `@akanass/rx-crypto` version `2.2.0`\n    * Latest `rxjs` version `7.4.0`\n    * Latest `nestjs` version `8.0.11`\n    * Update tests\n* v2.0.0 (2021-06-07)\n    * Update packages' versions\n    * Latest `@akanass/rx-crypto` version `2.0.0`\n    * Latest `rxjs` version `7.1.0`\n* v1.1.0 (2021-01-31)\n    * Update packages' versions\n    * Fix tests\n    * Fix `tslint`\n* v1.0.0 (2019-09-12)\n    * Implementation of `CryptoModule` with `AesService`, `HashService`, `JwtService`, `PemService`, `RandomStringService` and `RsaService`\n    * Implementation of `Observable's` operators for `AesService` and `RsaService` features.\n    * Related tests.\n    * Documentation.\n\n## License\n\nCopyright (c) 2021 **Nicolas Jessel** Licensed under the [MIT license](https://github.com/akanass/nestjsx-crypto/blob/master/LICENSE.md).\n\n[Back to top](#table-of-contents)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakanass%2Fnestjsx-crypto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakanass%2Fnestjsx-crypto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakanass%2Fnestjsx-crypto/lists"}