Skip to main content

SuiPian (碎片) - File disguise and restoration tool, hide files in plain sight

Project description

SuiPian (碎片)

Encode any file as plain text using invisible zero-width characters — looks perfectly normal, only the key can restore it.

How It Works

  1. Compress: LZ4 compression of source file
  2. Encrypt: AES-256-GCM with PBKDF2 key derivation (100k iterations)
  3. Encode: Binary payload → zero-width characters (​‌U+200B / ​‌U+200C)
  4. Append: Hidden data appended to carrier text end — output looks 100% normal

Undetectable: No special markers, no visible Base64, zero-width chars are invisible in most editors.

Features

  • Hide: Encode any file (image, document, etc.) into a seemingly normal text file
  • Reveal: Restore the original file from the disguised text using the password
  • Validate: Check if a text file contains hidden data
  • Info: Get metadata about hidden data

Requirements

  • Python 3.10+
  • lz4
  • cryptography

Installation

pip install suipian

Or install from source:

pip install -e .

Quick Start

CLI

Hide a file (image → text):

suipian hide photo.png article.txt -o output.txt -p mypassword

Reveal a file (text → image):

suipian reveal output.txt -o restored.png -p mypassword

Validate hidden data:

suipian validate output.txt

Get hidden file info:

suipian info output.txt

Python API

from suipian import hide_file, reveal_file, validate_morph

result = hide_file(
    source="photo.png",
    carrier="article.txt",
    output="output.txt",
    password="secret"
)

result = reveal_file(
    morphed="output.txt",
    output="restored.png",
    password="secret"
)

result = validate_morph(file="output.txt")
print(result.success)
print(result.data)

Agent Integration

from suipian.tools import TOOLS, dispatch

Development

pip install -e ".[dev]"
pytest tests/test_unified_api.py -v

License

GPL-3.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

suipian-1.0.3.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

suipian-1.0.3-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file suipian-1.0.3.tar.gz.

File metadata

  • Download URL: suipian-1.0.3.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for suipian-1.0.3.tar.gz
Algorithm Hash digest
SHA256 ca01af2bbdcd16f73250e11df594d79a68843514db0611b0ac756fbe5726e91a
MD5 fb98d5a7902667f1a47b7aed69618113
BLAKE2b-256 c65da6d29c21e5644edb2428d93c27002f71eacd1de390a706e0cc344ba81b7a

See more details on using hashes here.

File details

Details for the file suipian-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: suipian-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for suipian-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 faa663e7182031341064a691171b852be6b57f5c89f9b6b12c8cb9d2195cf869
MD5 dec3d1a88b12faa91830521c3e7f6b86
BLAKE2b-256 7c7b8cac0003e5acfc011828da3c7ad4cd9a691675eae648a1c99ea5e239bbf9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page