added a util function for detecting ecb mode