Skip to content

高安全性、高性能、功能丰富,且支持绑定同一物理设备进行文件加/解密

License

Notifications You must be signed in to change notification settings

gaoxianglong/encryption-dog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License License License

Encryption program with high performance, high security and rich functionsm.
Supports binding the same physical device for file encryption and decryption.

Use of EncryptionDog

install

git clone https://github.com/gaoxianglong/encryption-dog.git
mvn package
alias dog = 'java -Xms512m -Xmx512m -Xmn128m -jar dog-1.6.0.jar'

or

$ wget https://github.com/gaoxianglong/encryption-dog/releases/download/1.6.0-RELEASE/dog-1.6.0.jar
alias dog = 'java -Xms512m -Xmx512m -Xmn128m -jar dog-1.6.0.jar'

use

$ dog -h
Welcome to
   ____                       __  _           ___
  / __/__  __________ _____  / /_(_)__  ___  / _ \___  ___ _
 / _// _ \/ __/ __/ // / _ \/ __/ / _ \/ _ \/ // / _ \/ _ `/
/___/_//_/\__/_/  \_, / .__/\__/_/\___/_//_/____/\___/\_, /
                 /___/_/                             /___/
	version: 1.6.0-RELEASE

Usage: encrypt-dog [-bcdehoV] -k [-k]... [-n=<name>] -s=<source file>
                   [-t=<storage path>]
  -b, --sub-directory     Automatically encrypt and decrypt files in
                            subdirectories,default to false.
  -c, --compress          Compression is not enabled by default,Turning on
                            compression will increase execution time.
  -d, --delete            The source file is not deleted after the default
                            operation.
  -e, --encrypt           The default is decryption mode.
  -h, --help              Show this help message and exit.
  -k, --secret-key        Both encrypt and decrypt require the same secret key
  -n, --set-name=<name>   Set the name of the target file.
  -o, --only-local        Encryption and decryption operations can only be
                            performed on the same physical device.Only Apple
                            Mac is supported
  -s, --source-file=<source file>
                          Target files that need to be encrypt and decrypt,
                            Wildcards are supported.
  -t, --target-path=<storage path>
                          Storage path after operation,The default is stored in
                            the user home directory.
  -V, --version           Print version information and exit.
Copyright(c) 2021 - 2031 gaoxianglong. All Rights Reserved.

highest security

Files encrypted on computer a can only be decrypted on computer a.
Principle:

WARN:

Deleting or damaging the random key will never complete decryption.

# command -o, --only-local
# encrypt
$ dog -deos /Users/jiushu/Desktop/a.mp4 -k
Enter value for --secret-key (Both encrypt and decrypt require the same secret key):
Enter the secret-key again:
Please wait...

[Encrypt file number]:1/1
[Source path]:/Users/jiushu/Desktop/a.mp4
[Estimated time]:00:00:06
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 100%
[Encrypt result]:success
[Time consuming]:00:00:05,[Before size]:107.22MB,[After size]:142.96MB
[Target path]:/Users/jiushu/Desktop/a.mp4.dog

>>> Operation complete <<<
[Total time]:00:00:05
[Results]:total files:1,successes:1,failures:0

# decrypt
$ dog -ds /Users/jiushu/Desktop/a.mp4.dog -k
Enter value for --secret-key (Both encrypt and decrypt require the same secret key):
Please wait...

[Decrypt file number]:1/1
[Source path]:/Users/jiushu/Desktop/a.mp4.dog
[Estimated time]:00:00:06
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 100%
[Decrypt result]:success
[Time consuming]:00:00:05,[Before size]:142.96MB,[After size]:107.22MB
[Target path]:/Users/jiushu/Desktop/a.mp4

>>> Operation complete <<<
[Total time]:00:00:05
[Results]:total files:1,successes:1,failures:0

batch

When using batch mode, the source file path must use single quotation marks.

# encrypt
$ dog -es '/Users/jiushu/Desktop/*.mp4' -k
# decrypt
$ dog -s '/Users/jiushu/Desktop/*.dog' -k

set target path

The default is stored in the user home directory.

# command -t, --target-path=<storage path>
# encrypt
$ dog -es /Users/jiushu/Desktop/a.mp4 -t /Users/jiushu/ -k
# decrypt
$ dog -s /Users/jiushu/a.mp4.dog -t /Users/jiushu/Desktop -k

delete source file

# command -d, --delete
# encrypt
$ dog -des /Users/jiushu/Desktop/a.mp4 -k
# decrypt
$ dog -ds /Users/jiushu/Desktop/a.mp4.dog -k

set target file name

The default is the same as the source file name.

# command -n, --set-name=<name>
# encrypt
$ dog -des /Users/jiushu/Desktop/a.mp4 -n b -k
# decrypt
$ dog -ds /Users/jiushu/Desktop/b.mp4.dog -n c -k

the file is compressed after encryption

This operation is more time-consuming.

# command -c, --compress
# encrypt
$ dog -ces /Users/jiushu/Desktop/a.mp4 -k

store secret-key

WARN:This operation is unsafe. Please use it with caution.

# command
alias dog = 'java -Ddog-store=true -Xms512m -Xmx512m -Xmn128m -jar dog-1.6.0.jar'
# store style(secret-key to base64)
[source]\:a.b,[source-size]\:0.02MB,[target]\:a.b.dog,[target-size]\:0.05MB=MTIzNDU2bmloYW96YXE\=

file structure

file file extension name type magic number location amount ascii
DOG FORMAT .dog u4/32bit 0x19890225 header 1 ...