mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-22 13:21:03 +00:00
rename hasher_multisig to hasher_script
This commit is contained in:
parent
d07d865155
commit
b7d38973e2
@ -135,10 +135,10 @@ bool compute_address(const CoinInfo *coin,
|
||||
raw[0] = 0; // push version
|
||||
raw[1] = 32; // push 32 bytes
|
||||
memcpy(raw + 2, digest, 32); // push hash
|
||||
hasher_Raw(coin->curve->hasher_multisig, raw, 34, digest);
|
||||
hasher_Raw(coin->curve->hasher_pubkey, raw, 34, digest);
|
||||
prelen = address_prefix_bytes_len(coin->address_type_p2sh);
|
||||
address_write_prefix_bytes(coin->address_type_p2sh, raw);
|
||||
ripemd160(digest, 32, raw + prelen);
|
||||
memcpy(raw + prelen, digest, 32);
|
||||
if (!base58_encode_check(raw, prelen + 20, coin->curve->hasher_base58, address, MAX_ADDR_SIZE)) {
|
||||
return 0;
|
||||
}
|
||||
@ -364,7 +364,7 @@ uint32_t compile_script_multisig_hash(const CoinInfo *coin, const MultisigRedeem
|
||||
if (n < 1 || n > 15) return 0;
|
||||
|
||||
Hasher hasher;
|
||||
hasher_Init(&hasher, coin->curve->hasher_multisig);
|
||||
hasher_Init(&hasher, coin->curve->hasher_script);
|
||||
|
||||
uint8_t d[2];
|
||||
d[0] = 0x50 + m; hasher_Update(&hasher, d, 1);
|
||||
|
2
vendor/trezor-crypto
vendored
2
vendor/trezor-crypto
vendored
@ -1 +1 @@
|
||||
Subproject commit f9caee2489aa1ca8a3380c9fc79465a83c848b7f
|
||||
Subproject commit b679a6b2a73ed8adfe236cfa0ba73c5d86661633
|
Loading…
Reference in New Issue
Block a user