Skip to main content

encrypt/decrypt file header for simple and quick encrypt/decrypt

Project description

head-encrypt

简介

pypi

head-encrypt 是一款创新的文件加密工具,专门设计用于快速且高效地保护文件的首部信息。 在许多情况下,完全加密大型文件既不实际又耗时,尤其是当您只想防止未经授权的访问者识别文件类型或内容时。 head-encrypt提供了一种解决方案,通过仅加密文件的头部部分,既减少了加密过程所需的时间,又显著降低了磁盘空间的占用。

使用场景

  • 当您需要分享文件但又不想暴露文件类型时.
  • 当您想要保护文件内容不被轻易识别时。
  • 当您需要一种快速而有效的方式来“损害”文件,使其难以被未经授权的用户使用时。

特点

  • 快速加密:只加密文件头部,大幅减少加密所需时间。
  • 轻量化:由于仅加密文件的一部分,对系统资源的需求极小。
  • 不安全性:该加密仅加密文件头部,不要把它当成一个非常安全的加密手段

安装指南

  • 通过pip进行安装
pip install headecpt
  • 或采用离线方式,进行源码安装
git clone https://github.com/lichunown/head-encrypt.git
cd head-encrypt
python setup.py install

使用方法

在命令行中

> headecpt --help

Usage: headecpt [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  de   Decrypt the files
  en   Encrypt the files
  tde  Traverse dirs and Decrypt the matching files
  ten  Traverse dirs and encrypt the matching files
  • 加密指定文件
> headecpt en --help

Usage: headecpt en [OPTIONS] [PATH]...

  Encrypt the files

Options:
  -t, --type [rc4|no]      加密方式:no为无密钥加密,rc4为有密钥加密
  -h, --head_size INTEGER  待加密文件头大小
  -p, --password TEXT      加密密钥,若不指定则默认no加密方法,指定则默认为rc4方法
  --remain_name            是否对文件名进行加密,默认加密,若不加密则指定--without-name
  --help                   Show this message and exit.

例如:

headecpt en [filename]  # 单个文件
headecpt en [filename] -p "password"  # 有密码的加密
headecpt en *.mp4       # 基于通配符的多个文件
  • 解密指定文件
> headecpt de --help

Usage: headecpt de [OPTIONS] [PATH]...

  Decrypt the files

Options:
  -p, --password TEXT  解密密钥
  --help               Show this message and exit.

例如:

headecpt de [filename]  # 单个文件解密
headecpt de [filename] -p "password"  # 有密码的解密
headecpt de *.mp4       # 基于通配符的多个文件

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

headecpt-0.1.3.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

headecpt-0.1.3-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file headecpt-0.1.3.tar.gz.

File metadata

  • Download URL: headecpt-0.1.3.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for headecpt-0.1.3.tar.gz
Algorithm Hash digest
SHA256 2b6671bc136fba6e82eabe62c27406f4e0777d0ec5f0e761e6a96b674edf5238
MD5 8b3bdc8bd055de4bdc1b64bba58e0603
BLAKE2b-256 a5f2b720a8aa69aa6c83eba0cfaa886e56fc3a2a66d5b06713898e57d91df546

See more details on using hashes here.

File details

Details for the file headecpt-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: headecpt-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for headecpt-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 aa8262f253b24a9b65af917967fdf723b975571fffe1270054ed1881a990355d
MD5 171c6fba7817b050b2748e7014ff2204
BLAKE2b-256 82aa24335e837aa15731b742479793eebceafb0f4e07882ed0fd2310c50ccd5e

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