Skip to main content

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

Metadata

Release files for suipian 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for suipian 1.0.3
File Size Uploaded Provenance
suipian-1.0.3.tar.gz 25.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for suipian 1.0.3
File Interpreter ABI Platform
suipian-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 46.5 kB

Release files / suipian-1.0.3.tar.gz

Download URL suipian-1.0.3.tar.gz
Size 25.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ca01af2bbdcd16f73250e11df594d79a68843514db0611b0ac756fbe5726e91a
BLAKE2b-256 checksum
How to use checksums
c65da6d29c21e5644edb2428d93c27002f71eacd1de390a706e0cc344ba81b7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / suipian-1.0.3-py3-none-any.whl

Download URL suipian-1.0.3-py3-none-any.whl
Size 21.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
faa663e7182031341064a691171b852be6b57f5c89f9b6b12c8cb9d2195cf869
BLAKE2b-256 checksum
How to use checksums
7c7b8cac0003e5acfc011828da3c7ad4cd9a691675eae648a1c99ea5e239bbf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for suipian 1.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page