You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wobm c08453d43c add other decryption mode 1 month ago
cmd remove unused consts 1 month ago
pkg/tjcrypt add other decryption mode 1 month ago
.gitignore Add README.md and .gitignore 1 month ago
README.md Add README.md and .gitignore 1 month ago
go.mod init 1 month ago
go.sum init 1 month ago

README.md

tjcrypt-go

Golang port of the previous ndk based project tjcrypt

Build

This module uses CGO extension, used by LZ4 decompression/compression.

CGO_ENABLED=1 go build ./cmd/...

There is an alredy prebuilt binaries in releases. Currently only support linux, windows, and android. Support for OSX is planned in the near future.

Usage

If the output path isn’t supplied, the output will be directly written to stdout.

Decrypt:

tjdecrypt /path/to/encrypted/file [/path/to/output]

Encrypt:

tjencrypt /path/to/encrypted/file [/path/to/output]

API

Currently only support text type encryption, no blob files like png, jpg, etc.

// Decrypt supplied data and return the decrypted data
tjcrypt.Decrypt(data []byte) ([]byte, error)
// Encrypt supplied data and return the encrypted data, returned []byte also
// includes the tjcrypt header
tjcrypt.Encrypt(data []byte) ([]byte, error)