Changed CBC MAC function to use openssl