#!/usr/bin/bash

if [[ -r ../safewebdrop.config ]] ; then
    . ../safewebdrop.config
fi

if (( $# == 1 )) ; then
    if (( $(/usr/bin/cat $1 | /usr/bin/wc -c ) > 50 )) ; then
         /usr/bin/cp $1 $1-message.asc
	 /usr/bin/rm -f $1-message
         /usr/bin/gpg --batch --passphrase ${SEC} $1-message.asc
	 /usr/bin/ls -l ${1}*
    else
        /usr/bin/echo "no PGP message"
    fi	
else
    /usr/bin/echo "usage: decrypt filename"
fi
