Files
clearpilot/system/clearpilot/shell_archived/tools_wip_4_28/encrypt
Comma Device 1ff14d346f wip
2024-05-14 08:21:27 +00:00

18 lines
337 B
Bash
Executable File

#!/bin/bash
# Check for the correct number of arguments
if [ "$#" -ne 2 ]; then
echo "Usage: $0 source destination"
exit 1
fi
# Set variables for source and destination
src="$1"
dest="$2"
# Read DongleId for encryption key
dongle_id=/data/params/d/DongleId
# Encrypt the file
cat "$src" | ccrypt -e -k "$dongle_id" > "$dest"