fixes for encrypted string tests

should also check exception message