Merge pull request #779 from ethereum/JustinDrake-patch-4

Move to SHA256
This commit is contained in:
Danny Ryan 2019-03-26 07:19:46 -06:00 committed by GitHub
commit 2d413be91f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -668,7 +668,7 @@ def xor(bytes1: Bytes32, bytes2: Bytes32) -> Bytes32:
### `hash`
The hash function is denoted by `hash`. In Phase 0 the beacon chain is deployed with the same hash function as Ethereum 1.0, i.e. Keccak-256 (also incorrectly known as SHA3).
The `hash` function is SHA256.
Note: We aim to migrate to a S[T/N]ARK-friendly hash function in a future Ethereum 2.0 deployment phase.

View File

@ -1,7 +1,6 @@
# from hashlib import sha256
from eth_utils import keccak
from hashlib import sha256
# from eth_utils import keccak
# def hash(x): return sha256(x).digest()
def hash(x):
return keccak(x)
def hash(x): return sha256(x).digest()
# def hash(x): return keccak(x)