Make Ripemd160 the default

This commit is contained in:
Jae Kwon
2015-07-10 12:15:46 -07:00
parent 41845d5b85
commit 2e1d8ba054
10 changed files with 26 additions and 32 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ func GenPrivAccount() *PrivAccount {
// Generates a new account with private key from SHA256 hash of a secret
func GenPrivAccountFromSecret(secret []byte) *PrivAccount {
privKey32 := binary.BinarySha256(secret)
privKey32 := binary.BinarySha256(secret) // Not Ripemd160 because we want 32 bytes.
privKeyBytes := new([64]byte)
copy(privKeyBytes[:32], privKey32)
pubKeyBytes := ed25519.MakePublicKey(privKeyBytes)