mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 17:01:09 +00:00
metadata: Use HASH_LEN
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -55,9 +55,9 @@ fn xor(a: [u8; 32], b: [u8; 32]) -> [u8; 32] {
|
||||
/// potentially identical hashes, this is a safer way to ensure the result is
|
||||
/// unique.
|
||||
fn concat_and_hash(a: [u8; 32], b: [u8; 32]) -> [u8; 32] {
|
||||
let mut out = [0u8; 32 * 2];
|
||||
out[0..32].copy_from_slice(&a[..]);
|
||||
out[32..].copy_from_slice(&b[..]);
|
||||
let mut out = [0u8; HASH_LEN * 2];
|
||||
out[0..HASH_LEN].copy_from_slice(&a[..]);
|
||||
out[HASH_LEN..].copy_from_slice(&b[..]);
|
||||
hash(&out)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user