Unix philosophy favors composability over monolythic design. In this sense, your problem can be split into two separate problems:
- How do I bundle a folder into a single file suitable for sending?
You can do that with tar
command:
tar zcf ./myfiles.tar.gz ./myfolder/
- How do I encrypt a single file?
There's already an answer for that. For example:
openssl des3 < ./myfiles.tar.gz > ./myfiles.tar.gz.des3
To decrypt the file you can then use
openssl des3 -d < ./myfiles.tar.gz.des3 > ./myfiles-decrypted.tar.gz
And, finally, to "untar" the file into a directory:
tar zxf ./myfiles-decrypted.tar.gz