#!/usr/bin/env bash
echo -n "This is Task 6 of the Crypto Encryption Lab." > plain.txt

openssl enc -aes-128-cbc -e -in plain.txt -out c1.bin \
-K 00112233445566778899aabbccddeeff \
-iv 0102030405060708090a0b0c0d0e0f10

openssl enc -aes-128-cbc -e -in plain.txt -out c2.bin \
-K 00112233445566778899aabbccddeeff \
-iv 11111111111111111111111111111111

openssl enc -aes-128-cbc -e -in plain.txt -out c3.bin \
-K 00112233445566778899aabbccddeeff \
-iv 0102030405060708090a0b0c0d0e0f10

xxd c1.bin
xxd c2.bin
xxd c3.bin
cmp c1.bin c3.bin && echo "c1 = c3"
cmp c1.bin c2.bin || echo "c1 != c2"
