{"id":23143503,"url":"https://github.com/sh20raj/encriptorjs","last_synced_at":"2025-08-17T14:33:34.047Z","repository":{"id":173982092,"uuid":"651596671","full_name":"SH20RAJ/EncriptorJS","owner":"SH20RAJ","description":"EncriptorJS is a JavaScript text encryption library that allows you to securely encrypt and decrypt text. It provides       a simple interface to convert your text into an encrypted form and optionally add a key for additional security. Only       the correct key can be used to decrypt the text, ensuring that unauthorized access is prevented.","archived":false,"fork":false,"pushed_at":"2024-04-08T01:25:12.000Z","size":195,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-17T12:32:38.170Z","etag":null,"topics":["encryption","encryption-decryption","javascript","security-tools","sh20raj"],"latest_commit_sha":null,"homepage":"https://sh20raj.github.io/EncriptorJS","language":"JavaScript","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/SH20RAJ.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2023-06-09T15:39:31.000Z","updated_at":"2025-02-14T14:04:22.000Z","dependencies_parsed_at":"2024-03-12T03:44:13.460Z","dependency_job_id":"deb418c0-e0de-404e-a3e9-f4847aeeec81","html_url":"https://github.com/SH20RAJ/EncriptorJS","commit_stats":null,"previous_names":["sh20raj/encriptorjs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SH20RAJ/EncriptorJS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SH20RAJ%2FEncriptorJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SH20RAJ%2FEncriptorJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SH20RAJ%2FEncriptorJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SH20RAJ%2FEncriptorJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SH20RAJ","download_url":"https://codeload.github.com/SH20RAJ/EncriptorJS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SH20RAJ%2FEncriptorJS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270859465,"owners_count":24658208,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["encryption","encryption-decryption","javascript","security-tools","sh20raj"],"created_at":"2024-12-17T15:13:34.688Z","updated_at":"2025-08-17T14:33:33.763Z","avatar_url":"https://github.com/SH20RAJ.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EncriptorJS\n\n[![npm version](https://badge.fury.io/js/encriptorjs.svg)](https://badge.fury.io/js/encriptorjs)\n[![](https://data.jsdelivr.com/v1/package/gh/sh20raj/EncriptorJS/badge)](https://www.jsdelivr.com/package/gh/sh20raj/EncriptorJS)\n[![Visitors](https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fgithub.com%2FSH20RAJ%2FEncriptorJS%2F\u0026labelColor=%23f47373\u0026countColor=%23dce775\u0026style=flat)](https://visitorbadge.io/status?path=https%3A%2F%2Fgithub.com%2FSH20RAJ%2FEncriptorJS%2F)\n\nEncriptorJS is a JavaScript text encryption library that allows you to securely encrypt and decrypt text. It provides a simple interface to convert your text into an encrypted form and optionally add a key for additional security. Only the correct key can be used to decrypt the text, ensuring that unauthorized access is prevented.\n\n## Installation\n\nYou can use EncriptorJS by including the library in your JavaScript project or HTML file.\n\n### In a JavaScript project\n\n1. Download the EncriptorJS library file (`encriptor.js`) from the [GitHub repository](https://github.com/sh20raj/EncriptorJS).\n2. Move the `encriptor.js` file into your project directory.\n3. In your JavaScript file, import the EncriptorJS library:\n\n\n```javascript\n   import Encriptor from './encriptor.module.js';\n```\nor Use\n\n\n```bash\nnpm i encriptorjs\n```\n\n```javascript\n   import Encriptor from 'encriptorjs';\n```\n\n### In an HTML file\n\n1. Download the EncriptorJS library file (`encriptor.js`) from the [GitHub repository](https://github.com/sh20raj/EncriptorJS) or [NPMJS](https://www.npmjs.com/package/encriptorjs).\n2. Move the `encriptor.js` file into your project directory.\n3. In your HTML file, add the following script tag:\n\n   ```html\n   \u003cscript src=\"encriptor.js\"\u003e\u003c/script\u003e\n   ```\n   or\n   ```html\n   \u003cscript src=\"https://cdn.jsdelivr.net/gh/SH20RAJ/EncriptorJS@main/encriptor.min.js\"\u003e\u003c/script\u003e\n   ```\n\n## Usage\n\nOnce you have included the EncriptorJS library in your project, you can start encrypting and decrypting text.\n\n### Encrypting Text\n\nTo encrypt text, use the `encrypt` method of the `Encriptor` object. Here's an example:\n\n```javascript\nconst text = 'My name is Sh';\nconst key = '1234';\n\nconst encryptedText = Encriptor.encrypt(text, key);\nconsole.log(encryptedText); // Outputs: 'Kcdew9zdYidBf'\n```\n\nThe `encrypt` method takes two parameters: the `text` you want to encrypt and an optional `key` for additional security. It is recommended to use only digits in the `key` parameter. It returns the encrypted text.\n\n### Decrypting Text\n\nTo decrypt the encrypted text, use the `decrypt` method of the `Encriptor` object. Here's an example:\n\n```javascript\nconst encryptedText = 'Kcdew9zdYidBf'; // Replace with the encrypted text\nconst key = '1234';\nconst decryptedText = Encriptor.decrypt(encryptedText, key);\nconsole.log(decryptedText); // Outputs: 'My name is Sh'\n```\n\nThe `decrypt` method takes two parameters: the `encryptedText` you want to decrypt and the `key` used during encryption. It returns the decrypted text.\n\n### Shuffling Strings\n\nThe EncriptorJS library also provides a utility function called `shuffleString` that can be used to shuffle strings using a key. Here's how you can use it:\n\n```javascript\nconst text = 'Hello, World!';\nconst shuffledText = Encriptor.shuffleString(text, 42);\nconsole.log(shuffledText); // Outputs a shuffled version of the input string\n```\n\nThe `shuffleString` function takes a `text` parameter as the input string and an optional `key` parameter used to initialize the random number generator. By using the same key, you can obtain the same shuffled result. This function can be used for encryption purposes or to shuffle strings for other applications.\n\nPlease note that the `shuffleString` function alone does not provide strong encryption. For secure encryption, it is recommended to use well-established encryption algorithms and libraries designed for that purpose.\n\n`Encriptor.shuffle(text)` always gives different shuffled pattern.\n\n## Examples\n\nYou can find more examples in the [examples](https://replit.com/@SH20RAJ/EncriptorJS) directory of this repository. The examples demonstrate various use cases of the EncriptorJS library.\n\n## License\n\nThis project is licensed under the [MIT License](./LICENSE).\n\n## Refrences \n\n\u003e https://dev.to/sh20raj/creating-a-custom-javascript-function-to-shuffle-strings-with-a-key-parameter-3c8a\n\u003e https://dev.to/sh20raj/introducing-encriptorjs-secure-text-encryption-and-decryption-in-javascript-a-jwt-easy-to-use-alternative-l02\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsh20raj%2Fencriptorjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsh20raj%2Fencriptorjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsh20raj%2Fencriptorjs/lists"}