Usage of sm4crypt: sm4crypt [-d] -p "pass" [-i N] [-s "salt"] -f <file.ext> -a string Additional Associated Data. -d Decrypt instead of Encrypt. -f string Target file. ('-' for STDIN) -i int Iterations. (for PBKDF2) (default 1024) -k string 128-bit key to Encrypt/Decrypt. -p string Password-based key derivation function2. -r Generate random 128-bit cryptographic key. -s string Salt. (for PBKDF2)
./sm4crypt -k $128bitkey -f plaintext.ext > ciphertext.ext
./sm4crypt -d -k $128bitkey -f ciphertext.ext > plaintext.ext
This project is licensed under the ISC License.