Fix ZeroDivisionError on empty encrypted content