{"id":15573000,"url":"https://github.com/dfa1234/ngx-simple-crypt","last_synced_at":"2025-04-24T00:44:42.771Z","repository":{"id":65424555,"uuid":"101538825","full_name":"dfa1234/ngx-simple-crypt","owner":"dfa1234","description":"Angular module for encryption through XOR cipher method","archived":false,"fork":false,"pushed_at":"2017-11-13T18:10:12.000Z","size":13,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T19:43:18.446Z","etag":null,"topics":["angular","encryption","webpack"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ngx-simple-crypt","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/dfa1234.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}},"created_at":"2017-08-27T08:13:42.000Z","updated_at":"2022-02-22T20:07:44.000Z","dependencies_parsed_at":"2023-01-23T01:55:11.566Z","dependency_job_id":null,"html_url":"https://github.com/dfa1234/ngx-simple-crypt","commit_stats":null,"previous_names":["dfa1234/ng2-simple-crypt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfa1234%2Fngx-simple-crypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfa1234%2Fngx-simple-crypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfa1234%2Fngx-simple-crypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfa1234%2Fngx-simple-crypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfa1234","download_url":"https://codeload.github.com/dfa1234/ngx-simple-crypt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250285695,"owners_count":21405297,"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":["angular","encryption","webpack"],"created_at":"2024-10-02T18:09:44.501Z","updated_at":"2025-04-24T00:44:42.749Z","avatar_url":"https://github.com/dfa1234.png","language":"TypeScript","readme":"## ngx-simple-crypt\n\nJavascript module (compatible with any angular version, but not limited to angular) for encryption through XOR cipher method.\n\nUseful for hiding non sensitive informations, like code obfuscations, QR code datas, etc...\n\n### Import\n```sh\nnpm i ngx-simple-crypt\n```\nor\n```sh\nyarn add ngx-simple-crypt\n```\n\n### Usage\n\nNo module import needed, you can use anywhere:\n\n```javascript\nimport {SimpleCrypt} from \"ngx-simple-crypt\";\n```\n\n```javascript\nlet simpleCrypt = new SimpleCrypt();\n\nlet encodedString = simpleCrypt.encode(\"my-key\",\"You are not supposed to read this\");\nconsole.log(encodedString);// \"NBZYSwQLCFlDBBFZHgxdGwoKCB0NHwpZHxxMD0UNBRBe\"\n\nlet decodedString = simpleCrypt.decode(\"my-key\",encodedString);\nconsole.log(decodedString);// \"You are not supposed to read this\"\n```\n\nYou can also use the static methods for encoding/decoding Objects directly:\n\n```javascript\nlet encodedObjectAsString:string = SimpleCrypt.encodeDefault(\"my-key\", {data:'very important stuff'});\nlet object:{} = SimpleCrypt.decodeDefault(\"my-key\", encodedObjectAsString);\n```\n\n\nFrom [wikipedia](https://en.wikipedia.org/wiki/XOR_cipher):    \n*The XOR operator is extremely common as a component in more complex ciphers. By itself, using a constant repeating key, a simple XOR cipher can trivially be broken using frequency analysis. If the content of any message can be guessed or otherwise known then the key can be revealed. Its primary merit is that it is simple to implement, and that the XOR operation is computationally inexpensive. A simple repeating XOR (i.e. using the same key for xor operation on the whole data) cipher is therefore sometimes used for hiding information in cases where no particular security is required.*\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfa1234%2Fngx-simple-crypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfa1234%2Fngx-simple-crypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfa1234%2Fngx-simple-crypt/lists"}