JavaScript AES and CBC implementation using ArrayBuffer