File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
crates/starknet-types-core/src/hash Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,13 @@ pub struct Pedersen;
10
10
11
11
impl StarkHash for Pedersen {
12
12
/// Computes the Pedersen hash of two Felts, as defined
13
- /// in <https://docs.starknet.io/documentation/architecture_and_concepts/Hashing/hash-functions/ #pedersen_hash. >
13
+ /// in <https://docs.starknet.io/architecture/cryptography/ #pedersen_hash>
14
14
fn hash ( felt_0 : & Felt , felt_1 : & Felt ) -> Felt {
15
15
Felt ( PedersenStarkCurve :: hash ( & felt_0. 0 , & felt_1. 0 ) )
16
16
}
17
17
18
18
/// Computes the Pedersen hash of an array of Felts, as defined
19
- /// in <https://docs.starknet.io/documentation/architecture_and_concepts/Hashing/hash-functions/ #array_hashing. >
19
+ /// in <https://docs.starknet.io/architecture/cryptography/ #array_hashing>
20
20
///
21
21
/// Warning: there is room for collision as:
22
22
/// Pedersen::hash_array([value]) and Pedersen::hash(Pedersen::hash(0, value), 1) will return the same values
Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ pub struct Poseidon;
12
12
13
13
impl StarkHash for Poseidon {
14
14
/// Computes the Poseidon hash of two Felts, as defined
15
- /// in <https://docs.starknet.io/documentation/architecture_and_concepts/Hashing/hash-functions/ #poseidon_hash. >
15
+ /// in <https://docs.starknet.io/architecture/cryptography/ #poseidon_hash>
16
16
fn hash ( felt_0 : & Felt , felt_1 : & Felt ) -> Felt {
17
17
Felt ( PoseidonCairoStark252 :: hash ( & felt_0. 0 , & felt_1. 0 ) )
18
18
}
19
19
/// Computes the Poseidon hash of an array of Felts, as defined
20
- /// in <https://docs.starknet.io/documentation/architecture_and_concepts/Cryptography/hash-functions/#poseidon_array_hash. >
20
+ /// in <https://docs.starknet.io/architecture/cryptography/#array_hashing_2 >
21
21
fn hash_array ( felts : & [ Felt ] ) -> Felt {
22
22
// Non-copy but less dangerous than transmute
23
23
// https://doc.rust-lang.org/std/mem/fn.transmute.html#alternatives
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ pub trait StarkHash {
5
5
fn hash ( felt_0 : & Felt , felt_1 : & Felt ) -> Felt ;
6
6
7
7
/// Computes the hash of an array of Felts,
8
- /// as defined in <https://docs.starknet.io/documentation/architecture_and_concepts/Hashing/hash-functions/ #array_hashing. >
8
+ /// as defined in <https://docs.starknet.io/architecture/cryptography/ #array_hashing>
9
9
fn hash_array ( felts : & [ Felt ] ) -> Felt ;
10
10
11
11
fn hash_single ( felt : & Felt ) -> Felt ;
You can’t perform that action at this time.
0 commit comments