{"id":21586055,"url":"https://github.com/magiclen/node-magiccrypt","last_synced_at":"2025-04-10T20:15:02.440Z","repository":{"id":96040899,"uuid":"94664577","full_name":"magiclen/node-magiccrypt","owner":"magiclen","description":"MagicCrypt is a Java/PHP/NodeJS/Rust library to encrypt/decrypt strings, files, or data, using Data Encryption Standard(DES) or Advanced Encryption Standard(AES) algorithms. It supports CBC block cipher mode, PKCS7 padding and 64, 128, 192 or 256-bits key length. If the encrypted data is a string, it will be formatted automatically to Base64. ","archived":false,"fork":false,"pushed_at":"2024-11-26T17:22:16.000Z","size":318,"stargazers_count":5,"open_issues_count":4,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T17:55:18.051Z","etag":null,"topics":["aes","des","magic-crypt","nodejs","rust"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/magiclen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2017-06-18T04:17:39.000Z","updated_at":"2024-11-02T08:53:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"3481edb1-f657-4660-81d7-4d1742341ea5","html_url":"https://github.com/magiclen/node-magiccrypt","commit_stats":{"total_commits":23,"total_committers":1,"mean_commits":23.0,"dds":0.0,"last_synced_commit":"121a5be494cb0fff415b8a66f00b8afb0d272e01"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fnode-magiccrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fnode-magiccrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fnode-magiccrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fnode-magiccrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magiclen","download_url":"https://codeload.github.com/magiclen/node-magiccrypt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248026701,"owners_count":21035583,"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","des","magic-crypt","nodejs","rust"],"created_at":"2024-11-24T15:12:30.760Z","updated_at":"2025-04-10T20:15:02.432Z","avatar_url":"https://github.com/magiclen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"MagicCrypt\n=================================\n\n[![CI](https://github.com/magiclen/node-magiccrypt/actions/workflows/ci.yml/badge.svg)](https://github.com/magiclen/node-magiccrypt/actions/workflows/ci.yml)\n\nMagicCrypt is a Java/PHP/NodeJS/Rust library to encrypt/decrypt strings, files, or data, using Data Encryption Standard(DES) or Advanced Encryption Standard(AES) algorithms. It supports CBC block cipher mode, PKCS7 padding and 64, 128, 192 or 256-bits key length. If the encrypted data is a string, it will be formatted automatically to Base64.\n\nYou need to set up the Rust development environment: [rustup](https://rustup.rs/)\n\n## For Node.js\n\n### Encrypt\n\nYou can use **encrypt** method to encrypt any string. For example,\n\n```typescript\nimport { MagicCrypt } from \"magiccrypt\";\n\nconst mc = new MagicCrypt(\"magickey\", 256);\nconsole.log(mc.encrypt(\"http://magiclen.org\"));\n```\n\nThe result is,\n\n    DS/2U8royDnJDiNY2ps3f6ZoTbpZo8ZtUGYLGEjwLDQ=\n\nTo encrypt any data buffer to a base64 string,\n\n```typescript\nimport { MagicCrypt } from \"magiccrypt\";\n\nconst mc = new MagicCrypt(\"magickey\", 256);\nconsole.log(mc.encryptData(buffer));\n```\n\n### Decrypt\n\nYou can use **decrypt** method to decrypt any encrypted string. For example,\n\n```typescript\nimport { MagicCrypt } from \"magiccrypt\";\n\nconst mc = new MagicCrypt(\"magickey\", 256);\nconsole.log(mc.decrypt(\"DS/2U8royDnJDiNY2ps3f6ZoTbpZo8ZtUGYLGEjwLDQ=\"));\n```\n\nThe result is,\n\n    http://magiclen.org\n\nTo decrypt any base64 string to data buffer,\n\n```typescript\nimport { MagicCrypt } from \"magiccrypt\";\n\nconst mc = new MagicCrypt(\"magickey\", 256);\nconst buffer = mc.decryptData(base64);\n```\n\n## For Java\n\nRefer to [https://github.com/magiclen/MagicCrypt](https://github.com/magiclen/MagicCrypt).\n\n## For PHP\n\nRefer to [https://github.com/magiclen/MagicCrypt](https://github.com/magiclen/MagicCrypt).\n\n## For Rust\n\nRefer to [https://github.com/magiclen/rust-magiccrypt](https://github.com/magiclen/rust-magiccrypt).\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclen%2Fnode-magiccrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagiclen%2Fnode-magiccrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclen%2Fnode-magiccrypt/lists"}