AnkPcdHash from_value_with_outpoint takes &[u8]
This commit is contained in:
parent
0f47588e8d
commit
1068340c09
@ -85,10 +85,10 @@ impl AnkPcdHash {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Adding the root_commitment guarantee that the same clear value across different processes wont' produce the same hash
|
/// Adding the root_commitment guarantee that the same clear value across different processes wont' produce the same hash
|
||||||
pub fn from_value_with_outpoint(value: &Value, outpoint: &[u8]) -> Self {
|
pub fn from_value_with_outpoint(value: &[u8], outpoint: &[u8]) -> Self {
|
||||||
let mut eng = AnkPcdHash::engine();
|
let mut eng = AnkPcdHash::engine();
|
||||||
eng.input(outpoint);
|
eng.input(outpoint);
|
||||||
eng.input(value.to_string().as_bytes());
|
eng.input(value);
|
||||||
AnkPcdHash::from_engine(eng)
|
AnkPcdHash::from_engine(eng)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user