{"id":16416605,"url":"https://github.com/angeal185/hex-transposition-cipher","last_synced_at":"2025-10-19T13:57:28.781Z","repository":{"id":57263080,"uuid":"183705358","full_name":"angeal185/hex-transposition-cipher","owner":"angeal185","description":"hexadecimal transposition cipher for shuffle and reverse shuffling hex encoded cipher text ","archived":false,"fork":false,"pushed_at":"2019-04-28T01:38:09.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T16:47:51.188Z","etag":null,"topics":["cipher","decryption","encryption","hexadecimal","shuffle","transposition-cipher"],"latest_commit_sha":null,"homepage":"https://angeal185.github.io/hex-transposition-cipher","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/angeal185.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}},"created_at":"2019-04-26T23:22:09.000Z","updated_at":"2023-01-11T15:39:11.000Z","dependencies_parsed_at":"2022-09-01T04:27:35.675Z","dependency_job_id":null,"html_url":"https://github.com/angeal185/hex-transposition-cipher","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeal185%2Fhex-transposition-cipher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeal185%2Fhex-transposition-cipher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeal185%2Fhex-transposition-cipher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeal185%2Fhex-transposition-cipher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angeal185","download_url":"https://codeload.github.com/angeal185/hex-transposition-cipher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240304560,"owners_count":19780312,"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":["cipher","decryption","encryption","hexadecimal","shuffle","transposition-cipher"],"created_at":"2024-10-11T07:09:40.210Z","updated_at":"2025-10-19T13:57:28.712Z","avatar_url":"https://github.com/angeal185.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hex-transposition-cipher\nhexadecimal transposition cipher for shuffle and reverse shuffling hex encoded cipher text for nodejs and the browser.\n\nAdds an extra layer of protection to your already encrypted code's hex output by essentially turning it into nothing but valid hex.\n\ndemo: https://angeal185.github.io/hex-transposition-cipher/\n### Installation\n\nnpm\n\n```sh\n$ npm install hex-transposition-cipher\n```\n\n#### nodejs\n\n```sh\n$ const htc = require('hex-transposition-cipher');\n```\n\n\n#### browser\n\n```html\n\u003cscript src=\"./path-to/lodash.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"./dist/htc.min.js\"\u003e\u003c/script\u003e\n```\n\n### info\n\n\n```js\n// defaults\n{\n  decode: false, // set true for decrypt\n  reverse: false, // reverse encrypted/decrypted hex string\n}\n\n\n// htc.keyGenSync()\nconst key = htc.keyGen(); //generates random hex key from the default key\nconsole.log(key) // returns hex key ~ dont lose this\n\n\n/**\n * htc.keyGen(callback)\n * @param {function} callback\n */\n\nhtc.keyGen(function(i){\n    console.log(i) // returns hex key ~ dont lose this\n});\n\n\n/**\n * htc.subSync(hex, key, config)\n * @param {string} hex ~ hex string\n * @param {object} key ~ hex key\n * @param {object} config ~ optional options\n */\n\nlet res = htc.subSync('74657374', key, {decode:false, reverse: false});\nconsole.log(res); // returns encrypted hex string\n\nres = htc.subSync('74657374', key, {decode:true, reverse: false});\nconsole.log(res); // returns decrypted hex string\n\nres = htc.subSync('74657374', key, {decode:false, reverse: true});\nconsole.log(res); // returns encrypted hex string and reverses the output of the string\n\nres = htc.subSync('74657374', key, {decode:true, reverse: true});\nconsole.log(res); // returns decrypted hex string that has been reversed\n\n/**\n * htc.sub(hex, key, config, callback)\n * @param {string} hex ~ hex string\n * @param {object} key ~ hex key\n * @param {object} config ~ optional options\n * @param {function} callback\n */\n\nhtc.sub(res, key, {decode:true, reverse: false}, function(i){\n    console.log(i); // returns decrypted hex string\n})\n\n...\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangeal185%2Fhex-transposition-cipher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangeal185%2Fhex-transposition-cipher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangeal185%2Fhex-transposition-cipher/lists"}