Skip to content

Commit

Permalink
Add short help/info about encryption
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelg committed Jan 20, 2021
1 parent 5c031bb commit affd417
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ipfs-wormhole.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ if [ -z "${IWIPFSGATEWAY-}" ]; then
fi
if [ -z "${IWIPFSENCRYPTION-}" ]; then
IWIPFSENCRYPTION="symmetric"
echo "Using default encryption method, 'symmetric'. The environment variable IWIPFSENCRYPTION can be set to 'asymmetric' (advanced) or 'no' (ala transfer.sh)"
fi

# Check deps
Expand Down Expand Up @@ -53,15 +54,18 @@ send)
symmetric)
# Set passphrase for asymmetric encryption, if required
ENCRYPTIONCMD="$GPGCMD --batch --passphrase=$PASSWORD -c -o -"
echo "Using symmetric encryption"
;;
asymmetric)
# Will prompt for the public keys of recipients
ENCRYPTIONCMD="$GPGCMD -e -o -"
echo "Using asymetric GPG encryption"
;;
no)
# No encryption, `transfer.sh`-like mode, to allow a direct retrieval from
# the IPFS gateway
ENCRYPTIONCMD="cat"
echo "No encryption"
;;
*)
cat <<EOF
Expand Down

0 comments on commit affd417

Please sign in to comment.