#!/bin/sh -e

TD=$(mktemp -d)
TDP="${TD}/password"
trap 'rm -r $TD' EXIT

printf "ponies" > ${TDP}

echo Testing sqop RFC4880 encrypt to hop decrypt | sqop encrypt --profile rfc4880 --with-password "${TDP}" | hop decrypt --with-password "${TDP}"
echo Testing sqop RFC9580 encrypt to hop decrypt | sqop encrypt --profile rfc9580 --with-password "${TDP}" | hop decrypt --with-password "${TDP}"
echo Testing hop RFC4880 encrypt to sqop decrypt | hop encrypt --profile rfc4880 --with-password "${TDP}" | sqop decrypt --with-password "${TDP}"
echo Testing hop RFC9580 encrypt to sqop decrypt | hop encrypt --profile rfc9580 --with-password "${TDP}" | sqop decrypt --with-password "${TDP}"
