# flytekit.utils.pbhash

## Directory

### Methods

| Method | Description |
|-|-|
| [`compute_hash()`](#compute_hash) | Computes a deterministic hash in bytes for the Protobuf object. |
| [`compute_hash_string()`](#compute_hash_string) | Computes a deterministic hash in base64 encoded string for the Protobuf object. |

## Methods

#### compute_hash()

```python
def compute_hash(
    pb: google.protobuf.message.Message,
) -> bytes
```
Computes a deterministic hash in bytes for the Protobuf object.

| Parameter | Type | Description |
|-|-|-|
| `pb` | `google.protobuf.message.Message` | |

#### compute_hash_string()

```python
def compute_hash_string(
    pb: google.protobuf.message.Message,
) -> str
```
Computes a deterministic hash in base64 encoded string for the Protobuf object

| Parameter | Type | Description |
|-|-|-|
| `pb` | `google.protobuf.message.Message` | |

---
**Source**: https://github.com/unionai/unionai-docs/blob/main/content/api-reference/flytekit-sdk/packages/flytekit.utils.pbhash.md
**HTML**: https://www.union.ai/docs/v1/selfmanaged/api-reference/flytekit-sdk/packages/flytekit.utils.pbhash/
