/dports/net-p2p/c-lightning/lightning-0.10.2/external/libwally-core/src/swig_python/contrib/ |
H A D | sha.py | 6 b2h = hex_from_bytes variable 12 …self.assertEqual(b2h(sha256("This is a test message to hash".encode())), "726ca2c10e9d8b76e5b79f29… 14 …self.assertEqual(b2h(sha256(h2b("3e8379862d658e168c71f083bc05169b3b58ca3212e11c838b08629c5ca48a42"… 18 …self.assertEqual(b2h(sha256d("This is a test message to hash".encode())), "29e04e90a1075caaa06573e… 20 …self.assertEqual(b2h(sha256d(h2b("3e8379862d658e168c71f083bc05169b3b58ca3212e11c838b08629c5ca48a42… 31 …self.assertEqual(b2h(sha256('not bytes')), "b6cb5f25b258630497a18528fb8f73a64034e94e1ead857a8151e3… 33 …self.assertEqual(b2h(sha256d('not bytes')), "878eb992aeb736646ecf2c76f562c5d411a487d62ac172d098a83… 35 …self.assertEqual(b2h(sha512('not bytes')), "981e82b6ccc079c455cd3fd37b9e04f52f084ffb268a07c47b0447… 55 …self.assertEqual(b2h(sha256(None)), "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b… 56 …self.assertEqual(b2h(sha256d(None)), "5df6e0e2761359d30a8275058e299fcc0381534545f55cf43e41983f5d4c… [all …]
|
/dports/finance/py-pycoin/pycoin-0.91.20210515/tests/ |
H A D | tx_test.py | 4 from pycoin.encoding.hexbytes import b2h, h2b_rev 38 … b2h(tx.blanked_hash()), "909579526c4c2c441687c7478d3f96249724d2ff071d2272b44500d6cf70d5d6") 41 … b2h(tx.blanked_hash()), "909579526c4c2c441687c7478d3f96249724d2ff071d2272b44500d6cf70d5d6") 44 … b2h(tx.blanked_hash()), "10d4e87f7bf35f2949e7693e7a4a84189aad8631f0b2b0999e88f7261066cbe5") 47 … b2h(tx.blanked_hash()), "10d4e87f7bf35f2949e7693e7a4a84189aad8631f0b2b0999e88f7261066cbe5") 49 …self.assertEqual(b2h(tx.hash()), "10d4e87f7bf35f2949e7693e7a4a84189aad8631f0b2b0999e88f7261066cbe5… 51 …self.assertEqual(b2h(tx.hash()), "c91910058722f1c0f52fc5c734939053c9b87882a9c72b609f21632e0bd13751… 188 TX_LIST = [Tx.from_hex(b2h(binascii.a2b_base64(b64.encode("utf8")))) for b64 in TX_B64_LIST]
|
H A D | sighash_single_test.py | 4 from pycoin.encoding.hexbytes import b2h, b2h_rev 60 1000000000, network.script.compile('%s OP_CHECKSIG' % b2h(k.sec())))) 90 tx.txs_in[0].script = network.script.compile(b2h(sig)) 99 tx.txs_in[1].script = network.script.compile(b2h(sig)) 108 tx.txs_in[2].script = network.script.compile(b2h(sig)) 119 tx.txs_in[0].script = network.script.compile(b2h(sig)) 128 tx.txs_in[1].script = network.script.compile(b2h(sig)) 137 tx.txs_in[2].script = network.script.compile(b2h(sig))
|
H A D | hexbytes.py | 3 from pycoin.encoding.hexbytes import h2b, h2b_rev, b2h, b2h_rev 12 self.assertEqual(b2h(b), h)
|
H A D | solver_test.py | 4 from pycoin.encoding.hexbytes import b2h 82 script = network.script.compile("OP_0 [%s]" % b2h(key.hash160())) 89 … script = network.script.compile("OP_0 [%s]" % b2h(hashlib.sha256(underlying_script).digest())) 96 …p2sh_script = network.script.compile("OP_0 [%s]" % b2h(hashlib.sha256(underlying_script).digest()))
|
/dports/finance/py-pycoin/pycoin-0.91.20210515/tests/btc/ |
H A D | segwit_test.py | 5 from pycoin.encoding.hexbytes import b2h, b2h_rev, h2b 142 self.assertEqual(b2h(sc._hash_prevouts(SIGHASH_ALL)), 144 self.assertEqual(b2h(sc._hash_sequence(SIGHASH_ALL)), 146 self.assertEqual(b2h(sc._hash_outputs(SIGHASH_ALL, 0)), 311 self.assertEqual(b2h(sc._hash_prevouts(SIGHASH_ALL)), 313 self.assertEqual(b2h(sc._hash_sequence(SIGHASH_ALL)), 315 self.assertEqual(b2h(sc._hash_outputs(SIGHASH_ALL, 0)), 317 self.assertEqual(b2h(sc._hash_outputs(SIGHASH_SINGLE, 0)), 363 b2h(sc._segwit_signature_preimage( 378 b2h(sc._segwit_signature_preimage( [all …]
|
/dports/finance/py-pycoin/pycoin-0.91.20210515/pycoin/encoding/ |
H A D | hexbytes.py | 22 def b2h(the_bytes): function 27 return b2h(bytearray(reversed(the_bytes))) 40 return b2h(self) 43 return b2h(self)
|
/dports/finance/py-pycoin/pycoin-0.91.20210515/pycoin/key/ |
H A D | HierarchicalKey.py | 1 from ..encoding.hexbytes import b2h 27 yield ("fingerprint", b2h(self.fingerprint()), None) 28 yield ("parent_fingerprint", b2h(self.parent_fingerprint()), "parent f'print") 30 yield ("chain_code", b2h(self.chain_code()), None)
|
H A D | Key.py | 3 from pycoin.encoding.hexbytes import b2h 211 s = b2h(r.sec()) 213 s = b2h(r.hash160()) 238 yield ("key_pair_as_sec", b2h(self.sec(is_compressed=True)), None) 239 … yield ("key_pair_as_sec_uncompressed", b2h(self.sec(is_compressed=False)), " uncompressed") 246 yield ("hash160", b2h(hash160_c), None) 249 yield ("hash160_uncompressed", b2h(hash160_u), " uncompressed") 272 p2sh_script_hex = b2h(p2sh_script)
|
H A D | electrum.py | 7 from pycoin.encoding.hexbytes import b2h 51 self._secret_exponent = initial_key_to_master_key(b2h(self._initial_key)) 100 return "Electrum<E:%s>" % b2h(self.master_public_key())
|
/dports/finance/py-pycoin/pycoin-0.91.20210515/tests/script/ |
H A D | stackops_test.py | 8 def b2h(b): function 95 self.assertEqual(b2h(s[0]), "42cfa211018ea492fdee45ac637b7972a0ad6873") 101 self.assertEqual(b2h(s[0]), "0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33") 107 … self.assertEqual(b2h(s[0]), "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae") 113 self.assertEqual(b2h(s[0]), "e1cf7c8103476b6d7fe9e4979aa10e7c531fcf42") 119 … self.assertEqual(b2h(s[0]), "c7ade88fc7a21498a6a5e5c385e1f68bed822b72aa63c4a9a48a02c2466ee29e")
|
/dports/finance/py-pycoin/pycoin-0.91.20210515/pycoin/networks/ |
H A D | ContractAPI.py | 5 from pycoin.encoding.hexbytes import b2h 43 return self._script_tools.compile("OP_RETURN [%s]" % b2h(data)) 84 p2pk=lambda info: "%s OP_CHECKSIG" % b2h(info.get("sec")), 85 … p2pkh=lambda info: "OP_DUP OP_HASH160 %s OP_EQUALVERIFY OP_CHECKSIG" % b2h(info.get("hash160")), 86 p2pkh_wit=lambda info: "OP_0 %s" % b2h(info.get("hash160")), 87 p2sh=lambda info: "OP_HASH160 %s OP_EQUAL" % b2h(info.get("hash160")), 88 p2sh_wit=lambda info: "OP_0 %s" % b2h(info.get("hash256")), 90 … info.get("m"), " ".join(b2h(sk) for sk in info.get("sec_keys")), len(info.get("sec_keys"))),
|
H A D | bitcoinish.py | 22 from pycoin.encoding.hexbytes import b2h, h2b 69 yield ("key_pair_as_sec", b2h(key.sec(is_compressed=True)), None) 70 yield ("key_pair_as_sec_uncompressed", b2h(key.sec(is_compressed=False)), " uncompressed") 76 yield ("hash160", b2h(hash160_c), None) 79 yield ("hash160_uncompressed", b2h(hash160_u), " uncompressed") 102 p2sh_script_hex = b2h(p2sh_script) 155 return _sec_prefix + b2h(blob)
|
H A D | Contract.py | 1 from pycoin.encoding.hexbytes import b2h 46 yield ("hash160", b2h(hash160), None)
|
/dports/finance/py-pycoin/pycoin-0.91.20210515/pycoin/cmds/ |
H A D | b58.py | 8 from pycoin.encoding.hexbytes import b2h, h2b 42 print(b2h(blob)) 46 print(b2h(blob)) 51 print("contents: ", b2h(blob))
|
H A D | coinc.py | 4 from pycoin.encoding.hexbytes import b2h 40 d["compiled_script_hex"] = "0x%s" % b2h(compiled_script) 44 d["preimage_p2s_hex"] = b2h(network.contract.for_address(address_p2s)) 48 d["underlying_script"] = b2h(network.contract.for_address(address_p2s_wit))
|
/dports/devel/py-tables/tables-3.6.1/tables/scripts/ |
H A D | pttree.py | 136 b2h = bytes2human(use_si_units) 277 b2h(in_mem[path]), b2h(on_disk[path])) 300 b2h(in_mem[path]), b2h(on_disk[path])) 351 b2h(total_in_mem), b2h(total_on_disk)) 353 out_str += 'HDF5 file size: %s\n' % b2h(fsize) 432 def b2h(nbytes): function 441 return b2h
|
/dports/finance/py-pycoin/pycoin-0.91.20210515/pycoin/ |
H A D | block.py | 5 from .encoding.hexbytes import b2h, b2h_rev 134 return b2h(self.as_bin()) 152 … "calculated %s but block contains %s" % (b2h(calculated_hash), b2h(self.merkle_root)))
|
/dports/misc/py-toil/toil-5.4.0/src/toil/lib/ |
H A D | humanize.py | 8 from toil.lib.conversions import bytes2human as b2h, human2bytes as h2b unknown 29 return b2h(n)
|
/dports/graphics/argyllcms/Argyll_V1.9.2/spectro/ |
H A D | ss_imp.c | 68 static char b2h[16] = { variable 95 p->sbuf[0] = b2h[(rq >> 4) & 0xf]; in ss_add_soreq() 96 p->sbuf[1] = b2h[(rq >> 0) & 0xf]; in ss_add_soreq() 106 p->sbuf[2] = b2h[(rq >> 4) & 0xf]; in ss_add_ssreq() 107 p->sbuf[3] = b2h[(rq >> 0) & 0xf]; in ss_add_ssreq() 114 p->sbuf[0] = b2h[(c >> 4) & 0xf]; in ss_add_1() 115 p->sbuf[1] = b2h[(c >> 0) & 0xf]; in ss_add_1() 123 p->sbuf[1] = b2h[(s >> 0) & 0xf]; in ss_add_2() 125 p->sbuf[3] = b2h[(s >> 8) & 0xf]; in ss_add_2() 133 p->sbuf[1] = b2h[(i >> 0) & 0xf]; in ss_add_4() [all …]
|
/dports/finance/py-pycoin/pycoin-0.91.20210515/tests/ecdsa/ |
H A D | libsecp256k1_test.py | 8 from pycoin.encoding.hexbytes import b2h 46 b2h(public_key), 72 b2h(public_key),
|
/dports/finance/py-pycoin/pycoin-0.91.20210515/recipes/multisig/ |
H A D | 1_create_address.py | 9 from pycoin.encoding.hexbytes import b2h 40 print("Here is the pay 2-of-3 script: %s" % b2h(pay_to_multisig_script))
|
/dports/devel/efl/efl-1.25.1/src/examples/ephysics/ |
H A D | test_constraint.c | 11 Evas_Coord b1x, b1y, b1z, b1w, b1h, b1d, b2x, b2y, b2z, b2w, b2h, b2d; in _constraint_set() local 14 ephysics_body_geometry_get(body2, &b2x, &b2y, &b2z, &b2w, &b2h, &b2d); in _constraint_set() 19 b1z, b2x + b2w / 2, b2y + b2h / 2, b2z); in _constraint_set()
|
/dports/finance/py-pycoin/pycoin-0.91.20210515/pycoin/coins/bitcoin/ |
H A D | Spendable.py | 4 from pycoin.encoding.hexbytes import b2h, b2h_rev, h2b, h2b_rev 48 script_hex=b2h(self.script), 69 return "/".join([b2h_rev(self.tx_hash), str(self.tx_out_index), b2h(self.script),
|
/dports/finance/py-pycoin/pycoin-0.91.20210515/pycoin/services/ |
H A D | bitcoind.py | 1 from pycoin.encoding.hexbytes import b2h, b2h_rev 35 scriptPubKey=b2h(tx_out.script)
|