{"id":18285945,"url":"https://github.com/exodusmovement/buffer-noise","last_synced_at":"2025-04-05T08:30:45.134Z","repository":{"id":57190989,"uuid":"87352951","full_name":"ExodusMovement/buffer-noise","owner":"ExodusMovement","description":"Expand a buffer to a specified length.","archived":false,"fork":false,"pushed_at":"2023-05-12T23:00:11.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":31,"default_branch":"master","last_synced_at":"2024-04-14T13:10:04.025Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ExodusMovement.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-04-05T20:20:49.000Z","updated_at":"2024-06-21T15:59:51.369Z","dependencies_parsed_at":"2024-06-21T16:10:38.539Z","dependency_job_id":null,"html_url":"https://github.com/ExodusMovement/buffer-noise","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":"0.16666666666666663","last_synced_commit":"891c7e9d7eb9a6d82d70c9ed59cf0dd9d132854f"},"previous_names":["exodusmovement/buffer-expand"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExodusMovement%2Fbuffer-noise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExodusMovement%2Fbuffer-noise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExodusMovement%2Fbuffer-noise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExodusMovement%2Fbuffer-noise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ExodusMovement","download_url":"https://codeload.github.com/ExodusMovement/buffer-noise/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223174744,"owners_count":17100272,"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":[],"created_at":"2024-11-05T13:18:18.595Z","updated_at":"2024-11-05T13:18:19.343Z","avatar_url":"https://github.com/ExodusMovement.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# buffer-noise\n[![npm](https://img.shields.io/npm/v/buffer-noise.svg)](https://npmjs.com/package/buffer-noise)\n[![GitHub Actions Status](https://img.shields.io/github/workflow/status/ExodusMovement/buffer-noise/CI/master)](https://github.com/ExodusMovement/buffer-noise/actions/workflows/ci.yml?query=branch%3Amaster)\n\nExpand a buffer to a specified length. If the buffer is smaller than the specified length, the remaining space is filled with random bytes. A 32-bit Unsigned Big-Endian Integer containing the length of the data is always prepended to the buffer.\n\nThis module can be used for obfuscating an encrypted file's size for plausible deniability.\n\n## Installation\n\n    npm install buffer-noise\n\n## Usage\n\n```js\nconst size = 25\nconst { expand, shrink } = require('buffer-noise')(size)\n\nconst data = Buffer.from('Hello World!')\nconst newData = expand(data)\nconsole.log(data, newData)\n// Prints:\n// \u003cBuffer 48 65 6c 6c 6f 20 57 6f 72 6c 64 21\u003e\n// \u003cBuffer 00 00 00 0c 48 65 6c 6c 6f 20 57 6f 72 6c 64 21 91 5c d3 2f\u003e\nassert(newData.length === size)\nassert(shrink(newData).equals(data))\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexodusmovement%2Fbuffer-noise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexodusmovement%2Fbuffer-noise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexodusmovement%2Fbuffer-noise/lists"}