#!/bin/bash # Replace key and iv with your random string. The following are examples of how to generate the strings. key=$(openssl rand -hex 32) iv=$(openssl rand -hex 16) openssl enc -chacha20 -base64 -salt -md sha512 -in $1 -out $1.asc -K $key -iv $iv