{"id":29175757,"url":"https://github.com/egoroof/blowfish","last_synced_at":"2025-07-01T16:09:22.598Z","repository":{"id":15609548,"uuid":"78350207","full_name":"egoroof/blowfish","owner":"egoroof","description":"Blowfish encryption library for browsers and Node.js 🐡","archived":false,"fork":false,"pushed_at":"2024-09-26T22:20:50.000Z","size":329,"stargazers_count":54,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-25T20:36:35.542Z","etag":null,"topics":["blowfish","browser","cipher","encryption","javascript","library","nodejs"],"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/egoroof.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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-01-08T15:04:04.000Z","updated_at":"2025-06-15T06:31:29.000Z","dependencies_parsed_at":"2024-04-06T11:29:34.493Z","dependency_job_id":"30bf7c4f-a762-4585-9989-360fede35b4d","html_url":"https://github.com/egoroof/blowfish","commit_stats":{"total_commits":108,"total_committers":4,"mean_commits":27.0,"dds":0.02777777777777779,"last_synced_commit":"e8774b510c9372dcf7cf7884dc79b5b309bbadf9"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/egoroof/blowfish","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoroof%2Fblowfish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoroof%2Fblowfish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoroof%2Fblowfish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoroof%2Fblowfish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/egoroof","download_url":"https://codeload.github.com/egoroof/blowfish/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoroof%2Fblowfish/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261962057,"owners_count":23236861,"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":["blowfish","browser","cipher","encryption","javascript","library","nodejs"],"created_at":"2025-07-01T16:09:21.744Z","updated_at":"2025-07-01T16:09:22.585Z","avatar_url":"https://github.com/egoroof.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blowfish\n\n[![npm package][npm-badge]][npm]\n\n[npm-badge]: https://img.shields.io/npm/v/egoroof-blowfish.svg?style=flat-square\n[npm]: https://www.npmjs.com/package/egoroof-blowfish\n\n[Blowfish](\u003chttps://en.wikipedia.org/wiki/Blowfish_(cipher)\u003e) encryption library for browsers and Node.js.\n\nFind the changelog in [CHANGELOG.md](https://github.com/egoroof/blowfish/blob/master/CHANGELOG.md)\n\n## Table of Contents\n\n- [Installation](#installation)\n  - [JS modules](#js-modules)\n- [Usage](#usage)\n  - [Example](#example)\n  - [Block cipher mode of operation](#block-cipher-mode-of-operation)\n  - [Padding](#padding)\n  - [Return type](#return-type)\n\n## Installation\n\nTake latest version [here](https://unpkg.com/egoroof-blowfish) or with npm:\n\n```\nnpm install egoroof-blowfish --save\n```\n\n### JS modules\n\nThe library is only deployed in [native JS modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), so in browsers you have to use `script` with type `module`:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import { Blowfish } from 'https://your-host/blowfish.mjs';\n  // your code here..\n\u003c/script\u003e\n```\n\nOr bundle the library to your code.\n\nIn Nodejs it imports easily:\n\n```js\nimport { Blowfish } from 'egoroof-blowfish';\n```\n\n## Usage\n\nAll input data including key, IV, plaintext and ciphertext should be a `String` or `ArrayBuffer` / `Buffer`.\nStrings support all unicode including emoji ✨.\n\n### Example\n\n```js\nimport { Blowfish } from 'egoroof-blowfish';\n\nconst bf = new Blowfish('super key', Blowfish.MODE.ECB, Blowfish.PADDING.NULL); // only key isn't optional\nbf.setIv('abcdefgh'); // optional for ECB mode; bytes length should be equal 8\n\nconst encoded = bf.encode('input text even with emoji 🎅');\nconst decoded = bf.decode(encoded, Blowfish.TYPE.STRING); // type is optional\n```\n\n### Block cipher mode of operation\n\nhttps://en.wikipedia.org/wiki/Block_cipher_mode_of_operation\n\n```js\nBlowfish.MODE.ECB; // (default) Electronic Codebook\nBlowfish.MODE.CBC; // Cipher Block Chaining\n```\n\n### Padding\n\nhttp://www.di-mgt.com.au/cryptopad.html\n\n```js\nBlowfish.PADDING.PKCS5; // (default) Pad with bytes all of the same value as the number of padding bytes\nBlowfish.PADDING.ONE_AND_ZEROS; // Pad with 0x80 followed by zero bytes\nBlowfish.PADDING.LAST_BYTE; // Pad with zeroes except make the last byte equal to the number of padding bytes\nBlowfish.PADDING.NULL; // Pad with zero (null) characters\nBlowfish.PADDING.SPACES; // Pad with spaces\n```\n\n### Return type\n\nWhich type of data should return method `decode`:\n\n```js\nBlowfish.TYPE.STRING; // (default) String\nBlowfish.TYPE.UINT8_ARRAY; // Uint8Array\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegoroof%2Fblowfish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegoroof%2Fblowfish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegoroof%2Fblowfish/lists"}