yodeng / text2bin

tools for encrypt/decrypt text file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

text2bin

text2bin is a tool for encrypt or decrypt a regular file.

The encrypted file can not be read directly, but can be easily read by text2bin api.

install

pip install git+https://github.com/yodeng/text2bin.git
  • python >3.8 required

usage

encrypt file:
$ cat a.txt
你好!
hello!

$ text2bin -i a.txt -o a.tb
decrypt file
$ text2bin -i a.tb -o a.txt -d
$ cat a.txt
你好!
hello!
decrypt file in python code:
import sys
from text2bin import Bopen
with Bopen("example/a.tb", text=False) as fi:
    for line in fi:
        sys.stdout.buffer.write(line)

# 你好!
# hello!

About

tools for encrypt/decrypt text file

License:MIT License


Languages

Language:Python 99.8%Language:Shell 0.2%