def _pseudonymize_value(self, value: str, pseudonyms: list[dict]) -> str: hash_string = self._hasher.hash_str(value, salt=self._config.hash_salt) if self._cache.requires_storing(hash_string): encrypted_origin = self._encrypter.encrypt(value) pseudonyms.append({"pseudonym": hash_string, "origin": encrypted_origin}) return self._wrap_hash(hash_string)