Merge pull request #5463 from zingolabs/drop_pyblake2_dep

Drop pyblake2 dependency
This commit is contained in:
Charlie O'Keefe 2022-01-25 09:32:08 -07:00 committed by GitHub
commit 19bfc2f3b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 8 additions and 8 deletions

View File

@ -4,7 +4,7 @@
# Distributed under the MIT software license, see the accompanying # Distributed under the MIT software license, see the accompanying
# file COPYING or https://www.opensource.org/licenses/mit-license.php . # file COPYING or https://www.opensource.org/licenses/mit-license.php .
from pyblake2 import blake2b from hashlib import blake2b
from .mininode import CBlock, CTransaction, CTxIn, CTxOut, COutPoint from .mininode import CBlock, CTransaction, CTxIn, CTxOut, COutPoint
from .script import CScript, OP_0, OP_EQUAL, OP_HASH160, OP_TRUE, OP_CHECKSIG from .script import CScript, OP_0, OP_EQUAL, OP_HASH160, OP_TRUE, OP_CHECKSIG

View File

@ -1,4 +1,4 @@
from pyblake2 import blake2b from hashlib import blake2b
import struct import struct
from typing import (List, Optional) from typing import (List, Optional)

View File

@ -36,7 +36,7 @@ from threading import RLock
from threading import Thread from threading import Thread
import logging import logging
import copy import copy
from pyblake2 import blake2b from hashlib import blake2b
from .equihash import ( from .equihash import (
gbp_basic, gbp_basic,

View File

@ -22,7 +22,7 @@ if sys.version > '3':
bchr = lambda x: bytes([x]) bchr = lambda x: bytes([x])
bord = lambda x: x bord = lambda x: x
from pyblake2 import blake2b from hashlib import blake2b
from binascii import hexlify from binascii import hexlify
import struct import struct

View File

@ -13,7 +13,7 @@
import struct import struct
from pyblake2 import blake2b from hashlib import blake2b
from .mininode import ser_string, ser_uint256 from .mininode import ser_string, ser_uint256
from .script import ( from .script import (

View File

@ -52,7 +52,7 @@ static CBlock CreateGenesisBlock(const char* pszTimestamp, const CScript& genesi
* transaction cannot be spent since it did not originally exist in the * transaction cannot be spent since it did not originally exist in the
* database (and is in any case of zero value). * database (and is in any case of zero value).
* *
* >>> from pyblake2 import blake2s * >>> from hashlib import blake2s
* >>> 'Zcash' + blake2s(b'The Economist 2016-10-29 Known unknown: Another crypto-currency is born. BTC#436254 0000000000000000044f321997f336d2908cf8c8d6893e88dbf067e2d949487d ETH#2521903 483039a6b6bd8bd05f0584f9a078d075e454925eb71c1f13eaff59b405a721bb DJIA close on 27 Oct 2016: 18,169.68').hexdigest() * >>> 'Zcash' + blake2s(b'The Economist 2016-10-29 Known unknown: Another crypto-currency is born. BTC#436254 0000000000000000044f321997f336d2908cf8c8d6893e88dbf067e2d949487d ETH#2521903 483039a6b6bd8bd05f0584f9a078d075e454925eb71c1f13eaff59b405a721bb DJIA close on 27 Oct 2016: 18,169.68').hexdigest()
* *
* CBlock(hash=00040fe8, ver=4, hashPrevBlock=00000000000000, hashMerkleRoot=c4eaa5, nTime=1477641360, nBits=1f07ffff, nNonce=4695, vtx=1) * CBlock(hash=00040fe8, ver=4, hashPrevBlock=00000000000000, hashMerkleRoot=c4eaa5, nTime=1477641360, nBits=1f07ffff, nNonce=4695, vtx=1)

View File

@ -221,11 +221,11 @@ TEST(Joinsplit, HSig)
/* /*
// by Taylor Hornby // by Taylor Hornby
import pyblake2 import hashlib
import binascii import binascii
def hSig(randomSeed, nf1, nf2, joinSplitPubKey): def hSig(randomSeed, nf1, nf2, joinSplitPubKey):
return pyblake2.blake2b( return hashlib.blake2b(
data=(randomSeed + nf1 + nf2 + joinSplitPubKey), data=(randomSeed + nf1 + nf2 + joinSplitPubKey),
digest_size=32, digest_size=32,
person=b"ZcashComputehSig" person=b"ZcashComputehSig"