{"id":47444126,"url":"https://github.com/bad-antics/Steganography.jl","last_synced_at":"2026-04-06T13:00:59.261Z","repository":{"id":344636893,"uuid":"1182531758","full_name":"bad-antics/Steganography.jl","owner":"bad-antics","description":"LSB image steganography for Julia — hide and extract secret data in images","archived":false,"fork":false,"pushed_at":"2026-03-15T17:25:43.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-16T05:11:51.996Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Julia","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/bad-antics.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-15T16:41:32.000Z","updated_at":"2026-03-15T16:44:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bad-antics/Steganography.jl","commit_stats":null,"previous_names":["bad-antics/steganography.jl"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bad-antics/Steganography.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bad-antics%2FSteganography.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bad-antics%2FSteganography.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bad-antics%2FSteganography.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bad-antics%2FSteganography.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bad-antics","download_url":"https://codeload.github.com/bad-antics/Steganography.jl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bad-antics%2FSteganography.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31473271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T08:36:52.050Z","status":"ssl_error","status_checked_at":"2026-04-06T08:36:51.267Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-03-23T06:00:59.902Z","updated_at":"2026-04-06T13:00:59.248Z","avatar_url":"https://github.com/bad-antics.png","language":"Julia","funding_links":[],"categories":["Privacy and Anonymity"],"sub_categories":["Steganography"],"readme":"# Steganography.jl\n\n[![CI](https://github.com/bad-antics/Steganography.jl/actions/workflows/ci.yml/badge.svg)](https://github.com/bad-antics/Steganography.jl/actions/workflows/ci.yml)\n\n**LSB image steganography for Julia** — hide and extract secret data in images with zero external dependencies.\n\n## Features\n\n- **LSB steganography** — encode data in least significant bits of pixel values\n- **Configurable bit depth** — 1, 2, or 4 bits per channel (trade-off: capacity vs. distortion)\n- **Netpbm I/O** — built-in PGM (P5) and PPM (P6) reader/writer, no image library needed\n- **Arbitrary data** — hide strings, binary data, encryption keys, or any bytes\n- **File-level API** — one-liner encode/decode for image files\n- **Raw pixel API** — work directly with `Array{UInt8}` for integration with any image library\n- **Zero dependencies** — pure Julia, no external packages\n- **57 comprehensive tests** — encoding, decoding, distortion verification, Netpbm I/O, edge cases\n\n## Installation\n\n```julia\nusing Pkg\nPkg.add(url=\"https://github.com/bad-antics/Steganography.jl\")\n```\n\n## Quick Start\n\n### File-Level API\n\n```julia\nusing Steganography\n\n# Hide a message in an image\nencode_file(\"cover.ppm\", \"stego.ppm\", \"top secret message\")\n\n# Extract the hidden message\nmessage = decode_file(\"stego.ppm\")\nprintln(String(message))  # =\u003e \"top secret message\"\n```\n\n### Raw Pixel API\n\n```julia\nusing Steganography\n\n# Work with raw pixel data (any shape)\npixels = rand(UInt8, 100, 100, 3)  # 100×100 RGB image\n\n# Check capacity\nprintln(capacity(pixels))  # =\u003e bytes available for hiding\n\n# Encode\nstego = encode(pixels, \"hidden data\")\n\n# Decode\nrecovered = String(decode(stego))\nprintln(recovered)  # =\u003e \"hidden data\"\n```\n\n### Higher Capacity (2-bit or 4-bit LSB)\n\n```julia\nconfig = StegoConfig(bits_per_channel=2)  # 2× capacity, slightly more visible\n\nstego = encode(pixels, large_data; config=config)\nrecovered = decode(stego; config=config)\n```\n\n## API Reference\n\n### Core Functions\n\n| Function | Description |\n|----------|-------------|\n| `encode(pixels, data; config)` | Return new array with data hidden in LSBs |\n| `encode!(pixels, data; config)` | Encode data in-place |\n| `decode(pixels; config)` | Extract hidden data from pixel LSBs |\n| `capacity(pixels; config)` | Maximum bytes that can be hidden |\n\n### File Functions\n\n| Function | Description |\n|----------|-------------|\n| `encode_file(input, output, data; config)` | Read image, encode, write result |\n| `decode_file(filepath; config)` | Read image, extract hidden data |\n| `read_netpbm(filepath)` | Read PGM/PPM image |\n| `write_netpbm(filepath, image_or_pixels)` | Write PGM/PPM image |\n\n### Configuration\n\n```julia\nStegoConfig(bits_per_channel=1)  # 1, 2, or 4 bits per channel\n```\n\n| bits_per_channel | Max distortion per pixel | Relative capacity |\n|:---:|:---:|:---:|\n| 1 | ±1 | 1× |\n| 2 | ±3 | 2× |\n| 4 | ±15 | 4× |\n\n## How It Works\n\n1. **Length header**: A 4-byte big-endian payload length is prepended to the data\n2. **Bit spreading**: Each payload byte is spread across `8/bpc` pixels by replacing LSBs\n3. **Extraction**: LSBs are collected from pixels and reassembled into bytes\n\nThe encoding only modifies the least significant bit(s) of each pixel, making changes\nimperceptible to the human eye (especially at 1-bit LSB).\n\n## Supported Formats\n\n- **PGM (P5)** — binary grayscale (8-bit)\n- **PPM (P6)** — binary RGB color (24-bit)\n- **Raw arrays** — any `Array{UInt8}` of any dimension\n\n\u003e **Tip**: Convert to/from PNG/JPEG using your preferred image library, then use the raw pixel API.\n\n## License\n\nMIT — see [LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbad-antics%2FSteganography.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbad-antics%2FSteganography.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbad-antics%2FSteganography.jl/lists"}