{"id":20671090,"url":"https://github.com/allnulled/criptador4js","last_synced_at":"2025-08-29T06:29:05.971Z","repository":{"id":57210730,"uuid":"462013167","full_name":"allnulled/criptador4js","owner":"allnulled","description":"Encrypt JS files or code.","archived":false,"fork":false,"pushed_at":"2022-02-28T02:43:18.000Z","size":10,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-09T03:59:38.327Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/allnulled.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}},"created_at":"2022-02-21T20:01:38.000Z","updated_at":"2023-03-03T23:36:42.000Z","dependencies_parsed_at":"2022-08-31T05:02:26.916Z","dependency_job_id":null,"html_url":"https://github.com/allnulled/criptador4js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/allnulled/criptador4js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allnulled%2Fcriptador4js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allnulled%2Fcriptador4js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allnulled%2Fcriptador4js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allnulled%2Fcriptador4js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/allnulled","download_url":"https://codeload.github.com/allnulled/criptador4js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allnulled%2Fcriptador4js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272641806,"owners_count":24968807,"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-29T02:00:10.610Z","response_time":87,"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":[],"created_at":"2024-11-16T20:24:57.795Z","updated_at":"2025-08-29T06:29:05.930Z","avatar_url":"https://github.com/allnulled.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# criptador4js\n\nEncrypt JS files or code.\n\n## Installation\n\n```sh\n$ npm i -s criptador4js\n```\n\n## What is it for?\n\nWhat `criptador4js` does is to transform **valid JS code** to **valid and encrypted JS code**.\n\n## How it works\n\nThe tool accepts a JS file, that can be run on node or browser, and transforms this file into\nanother JS file that does exactly that same that the previous one did, with one difference:\n*the JS source code is in a string, and encrypted, and on runtime, the user is asked for the password\nfor this code to be decrypted correctly*.\n\nIf the user enters the correct password, the source code is correctly decrypted. Othewise, it won't be possible to run any JS, because the `eval` function will try to run invalid JS code, as it was not decrypted correctly through the correct password.\n\n## Usage\n\n\n\n### CLI\n\nThe command-line interface is only for files:\n\n```sh\n$ criptador4js\n   # Required:\n    --message \"Question?\"\n    --password \"Answer\"\n    --file file1.js\n    --file file2.js\n    --file file3.js\n   # Optional:\n    --verbose # prints every file path\n    --override # replaces the file directly\n    --export MyApi # globalizes the module\n```\n\n### API\n\nThe API, instead, can encrypt JS code from files:\n\n```js\nCriptador4js.encryptFile(\"./index.js\");\nCriptador4js.encryptFile(\n  // Required:\n  \"./index.js\",\n  // Optional:\n  \"answer\",\n  \"Question?\",\n  \"MySuperIndex\",\n  \"index.crypt.js\",\n  !!\"shouldOverride\"\n); // creates: index.crypt.js\n//\n// Signature:\n//    file,\n//    password,\n//    message,\n//    globalId = false,\n//    outputFile = undefined,\n//    shouldOverride = false\n//\n```\n\n...but also from strings (in browser):\n\n```js\nconst encryptedCode = Criptador4js.encryptCode(\n  // Required:\n  \"alert('You successfully decrypted the code'); 'The last value is returned by eval';\",\n  // Optional:\n  \"answer\",\n  \"Question?\",\n  \"GlobalId\",\n); // returns: evaluable async JS code\nconst response = eval(encryptedCode);\nconst output = await response; // evaluation always returns a Promise...\nconst everythingWentFine = output === 'The last value is returned by eval'; // true\n```\n\n## Why\n\nBecause more than 160 projects, and you do not give me a job... you are insane.\n\n## Usage with Git\n\nBy default, and without using the `--override` flag, `criptador4js` will generate a `*.crypt.js` file from our `*.js` source file.\n\nSo, to commit only crypted files, add on `.gitignore` file, these lines:\n\n```\n*.js\n!*.crypt.js\n```\n\nThis way, your commits will only register crypted JS files.\n\nAlternatively, you can use the flag `--override` to directly replace the original files by the new, encrypted and executable file.\n\n## Trascendence\n\nGo fuck yourself. Fucking rats.\n\n## License\n\nNo license, do what you want. The rat is not me here.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallnulled%2Fcriptador4js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallnulled%2Fcriptador4js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallnulled%2Fcriptador4js/lists"}