text_blind_watermark
Put message(blind watermark) into a text. so that the message is invisible, and the changes of the text are not perceptible.
- Video demo:https://www.bilibili.com/video/BV1m3411s7kT
- Online demo(from old version, for demo only): https://www.guofei.site/pictures_for_blog/app/text_watermark/v1.html
- 中文 readme README_cn.md
- Source code: https://github.com/guofei9987/text_blind_watermark
- Rust Version: https://github.com/guofei9987/hidden_watermark
Can be used in
- dingding
- zhihu.com
- ...
How to Use
install
pip install text_blind_watermark
embed message into text:
from text_blind_watermark import TextBlindWatermark
password = b"p@ssw0rd"
watermark = b"This is watermark"
original_text_file = 'files/file_txt.txt'
file_with_watermark = 'files/file_txt_with_watermark.txt'
with open(original_text_file, 'r') as f:
text = f.read()
twm = TextBlindWatermark(pwd=password)
# add watermark into the text
text_with_wm = twm.add_wm_rnd(text=text, wm=watermark)
# write into a new file
with open(file_with_watermark, 'w') as f:
f.write(text_with_wm)
read and extract watermark
from text_blind_watermark import TextBlindWatermark
password = b"p@ssw0rd"
file_with_watermark = 'files/file_txt_with_watermark.txt'
with open(file_with_watermark, 'r') as f:
text_with_wm_new = f.read()
twm = TextBlindWatermark(pwd=password)
watermark_extract = twm.extract(text_with_wm_new)
print(watermark_extract)
watermark extracted: This is a watermark
Related Project
HideInfo:https://github.com/guofei9987/HideInfo
| 算法 | 说明 |
|---|---|
| migrate tank | 使图片在不同的背景下显示不同的图片 |
| hide as image | 把数据以图片形式存放 |
| hide in image | 把数据藏在一个图片中 |
| image seed | 把图片和文件黏在一起,并存为图片 |
| EXIF | 把一段信息放到图片的EXIF中 |
| hide as music | 把数据以音频的形式存放 |
| hide in music | 把数据隐藏在一个音频中 |
| hide as text | 把数据以文本文件的形式存放 |
| hide in text | 把数据隐藏在一段文本中 |
Metadata
Release files for text-blind-watermark 0.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| text_blind_watermark-0.4.2.tar.gz | 5.5 kB | Without provenance | Details for text_blind_watermark-0.4.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| text_blind_watermark-0.4.2-py3-none-any.whl | Python 3 | none | any | Details for text_blind_watermark-0.4.2-py3-none-any.whl |
Total release size: 11.6 kB
Release files / text_blind_watermark-0.4.2.tar.gz
| Download URL | text_blind_watermark-0.4.2.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
558b3a63eb5fcaee110f8c18aa809e99937369479fbb63be26c3a885b3f10606
|
|
BLAKE2b-256 checksum How to use checksums |
45e15a428f9cd0aa04cd5802ace995be4c267e93a3686ebf2ec40023662a13d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / text_blind_watermark-0.4.2-py3-none-any.whl
| Download URL | text_blind_watermark-0.4.2-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
72ac14ae1caec102df06a5a36df3f9e4d706f6ffa4eebb9e1835e77cf619510b
|
|
BLAKE2b-256 checksum How to use checksums |
eed3ca3da3cc0b0c0ca749aaec2a3366fb8df0e35cdfe2f3bb152a2e3ff5e483
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Security for text-blind-watermark 0.4.2
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.