added cbc encryption mode implementation