cleanup
fix crypto bug:
Avoid information leakage by using a new iv per encryption for block cipher in cbc mode.
crypto bug fix: handle empty input correctly.