Modified the block cipher adapter to properly handle empty strings