> ## Documentation Index
> Fetch the complete documentation index at: https://docs.starknet.io/llms.txt
> Use this file to discover all available pages before exploring further.

# pedersen

## pedersen

```rust theme={null}
extern fn pedersen(a: felt252, b: felt252) -> felt252;
```

Computes the Pedersen hash of two `felt252` values.

The Pedersen hash function is a collision-resistant cryptographic hash function that takes two field elements as input and produces a single field element as output.

### Parameters

* `a: felt252` - The first input value
* `b: felt252` - The second input value

### Returns

* `felt252` - The Pedersen hash of the two input values

### Example

```rust theme={null}
use core::pedersen::pedersen;

let hash = pedersen(1, 2);
// Result: hash value as felt252
```

### Related

* [`HashState`](./core-pedersen-HashState) - For computing Pedersen hashes of multiple values
* [`PedersenTrait`](./core-pedersen-PedersenTrait) - Trait for creating new hash states
