starknet_crypto/pedersen_hash/
default.rs

1use starknet_types_core::{
2    felt::Felt,
3    hash::{Pedersen, StarkHash},
4};
5
6/// Computes the Starkware version of the Pedersen hash of x and y. All inputs are little-endian.
7///
8/// ### Parameters
9///
10/// - `x`: The x coordinate.
11/// - `y`: The y coordinate.
12pub fn pedersen_hash(x: &Felt, y: &Felt) -> Felt {
13    Pedersen::hash(x, y)
14}