Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
81bc721c
Commit
81bc721c
authored
Jul 03, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed address generation
parent
35ae9e3a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
crypto.go
ethcrypto/crypto.go
+3
-5
No files found.
ethcrypto/crypto.go
View file @
81bc721c
...
@@ -3,8 +3,8 @@ package ethcrypto
...
@@ -3,8 +3,8 @@ package ethcrypto
import
(
import
(
"code.google.com/p/go.crypto/ripemd160"
"code.google.com/p/go.crypto/ripemd160"
"crypto/sha256"
"crypto/sha256"
"github.com/ethereum/eth-go/ethutil"
"github.com/obscuren/sha3"
"github.com/obscuren/sha3"
"math/big"
)
)
func
Sha256Bin
(
data
[]
byte
)
[]
byte
{
func
Sha256Bin
(
data
[]
byte
)
[]
byte
{
...
@@ -28,8 +28,6 @@ func Sha3Bin(data []byte) []byte {
...
@@ -28,8 +28,6 @@ func Sha3Bin(data []byte) []byte {
}
}
// Creates an ethereum address given the bytes and the nonce
// Creates an ethereum address given the bytes and the nonce
func
CreateAddress
(
b
[]
byte
,
nonce
*
big
.
Int
)
[]
byte
{
func
CreateAddress
(
b
[]
byte
,
nonce
uint64
)
[]
byte
{
addrBytes
:=
append
(
b
,
nonce
.
Bytes
()
...
)
return
Sha3Bin
(
ethutil
.
NewValue
([]
interface
{}{
b
,
nonce
})
.
Encode
())[
12
:
]
return
Sha3Bin
(
addrBytes
)[
12
:
]
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment