# hash_string

> **Function** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/callbacks/utils/hash_string)

Hash a string using sha1.

## Signature

```python
hash_string(
    s: str,
) -> str
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `s` | `str` | Yes | The string to hash. |

## Returns

`str`

The hashed string.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/callbacks/utils.py#L65)