Coder Social home page Coder Social logo

gaoxianglong / encryption-dog Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 1.23 MB

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

License: Apache License 2.0

Java 100.00%
encryption high-performance high-security binding-the-same-physical-device protect-your-secrets

encryption-dog's Introduction

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 ...

encryption-dog's People

Contributors

gaoxianglong avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ajunlonglive

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.