Hi
I have openssl command in the script and I am providing key and iv for the command. I am getting the error
./encryCipher.sh
Enter the input file name:
words
non-hex digit
invalid hex key value
and this is my script
#!/bin/bash
# Key for the openssl
key=01020304050607080910abbccddeeffg
# iv acts as password with Key
iv=0112233445566778
echo "Enter the input file name: "
read inputFile
if [ -e $inputFile".txt" ]
then
openssl enc -aes-128-cbc -in $inputFile".txt" -out aes128cbc.bin \
-K $key -iv $iv
else
echo "Sorry, $inputFile does not exist"
fi