Refactor StringEncrypter