You can tar, gzip, and encrypt the contents of the current directory with...
tar -czp * | gpg --compress-algo uncompressed --cipher-algo AES256 --passphrase "ryan" --output ../backup.tgz.gpg --symmetric -
after which the data can be extracted with...
gpg --decrypt ../backup.tgz.gpg | tar -xz
And that is only one way of many. I know it isn't all you asked for, but I hope it helps you with writing the rest of your script.
Happy with ur solution... then tick "yes" and mark as Solved!