michael@0: #!/bin/sh michael@0: for i in 0 1 2 michael@0: do michael@0: file="aes_ctr_$i.txt" michael@0: grep Key $file | sed -e 's;Key=;;' | hex > key$i michael@0: grep "Init. Counter" $file | sed -e 's;Init. Counter=;;' | hex > iv$i michael@0: grep "Ciphertext" $file | sed -e 's;Ciphertext=;;' | hex | btoa > ciphertext$i michael@0: grep "Plaintext" $file | sed -e 's;Plaintext=;;' | hex > plaintext$i michael@0: done