{"id":16416585,"url":"https://github.com/angeal185/atbash-cipher","last_synced_at":"2026-05-14T23:39:50.289Z","repository":{"id":57186031,"uuid":"184582974","full_name":"angeal185/atbash-cipher","owner":"angeal185","description":"atbash cipher in javascript for nodejs and the browser","archived":false,"fork":false,"pushed_at":"2019-05-03T03:13:20.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-06T18:09:52.256Z","etag":null,"topics":["atbash","cipher","decryption","encryption","encryption-decryption","nodejs"],"latest_commit_sha":null,"homepage":"https://angeal185.github.io/atbash-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-05-02T13:08:33.000Z","updated_at":"2019-05-04T13:54:07.000Z","dependencies_parsed_at":"2022-09-14T10:03:18.118Z","dependency_job_id":null,"html_url":"https://github.com/angeal185/atbash-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%2Fatbash-cipher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeal185%2Fatbash-cipher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeal185%2Fatbash-cipher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeal185%2Fatbash-cipher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angeal185","download_url":"https://codeload.github.com/angeal185/atbash-cipher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240466791,"owners_count":19805862,"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":["atbash","cipher","decryption","encryption","encryption-decryption","nodejs"],"created_at":"2024-10-11T07:09:36.210Z","updated_at":"2026-05-14T23:39:45.253Z","avatar_url":"https://github.com/angeal185.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# atbash-cipher\natbash cipher in javascript for nodejs and the browser\n\ndemo: https://angeal185.github.io/atbash-cipher/\n\n### Installation\n\nnpm\n\n```sh\n$ npm install atbash-cipher --save\n```\n\nbower\n\n```sh\n$ bower install atbash-cipher\n```\n\ngit\n```sh\n$ git clone git@github.com:angeal185/atbash-cipher.git\n```\n\n### nodejs\n\n```js\nconst atbash = require('atbash-cipher')\n```\n\n#### browser\n\n```html\n\u003cscript src=\"./dist/atbash.min.js\"\u003e\u003c/script\u003e\n```\n\n#### API\n\n```js\n\n/**\n * shuffles your shift key (optional)\n *  @param {string} str ~ shift key\n **/\natbash.keygen(str)\n\n\n/**\n *  callback\n *  @param {string} data ~ data to encrypt/decrypt\n *  @param {string} key ~ shift key\n *  @param {boolean} enc ~ true = encrypt | false = decrypt\n *  @param {function} cb ~ callback function(err,data)\n **/\natbash.shift(data, key, enc, cb) //returns callback\n\n\n/**\n *  sync\n *  @param {string} data ~ data to encrypt/decrypt\n *  @param {string} key ~ shift key\n *  @param {boolean} enc ~ true = encrypt | false = decrypt\n **/\natbash.shiftSync(data, key, enc) //returns a string\n\n/**\n *  promise\n *  @param {string} data ~ data to encrypt/decrypt\n *  @param {string} key ~ shift key\n *  @param {boolean} enc ~ true = encrypt | false = decrypt\n **/\natbash.shiftP(data, key, enc) //returns a promise\n\n\n// demo\n\nconst atbash = require('atbash-cipher');\n\n(function(){\n\n  let test = '8476235846328abcdcdef',\n  key = atbash.keygen('ABCDEF0123456789');\n\n  //keygen\n  console.log('keygen: '+ key)\n\n  //sync\n  console.log('sync test starting...')\n  let syncEnc = atbash.shiftSync(test, key, true);\n  console.log(syncEnc)\n  let syncDec = atbash.shiftSync(syncEnc.data, key, false)\n  console.log(syncDec)\n  if(syncEnc.err){\n    console.log('sync enc test failure.')\n  } else if(syncDec.err){\n    console.log('sync dec test failure.')\n  } else {\n    console.log('sync test done.')\n  }\n\n  //callback\n  console.log('callback test starting...')\n  atbash.shift(test, key, true, function(err,res){\n    if(err){return console.log('callback enc test failure.')}\n    console.log(res)\n    atbash.shift(res.data, key, false, function(err,res){\n      if(err){return console.log('callback dec test failure.')}\n      console.log(res)\n      console.log('callback test done.')\n    })\n  })\n\n  // promise\n  console.log('promise test starting...')\n  atbash.shiftP(test, key, true).then(function(res){\n    console.log(res)\n    atbash.shiftP(res.data, key, false).then(function(res){\n      console.log(res)\n      console.log('promise test done.')\n    }).catch(function(err){\n      console.log('promise dec test failure.')\n    })\n  }).catch(function(err){\n    console.log('promise enc test failure.')\n  })\n})()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangeal185%2Fatbash-cipher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangeal185%2Fatbash-cipher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangeal185%2Fatbash-cipher/lists"}