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
8ef17c2f
Commit
8ef17c2f
authored
Sep 13, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fi crypto
parent
ccea5fa9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
16 deletions
+2
-16
crypto.go
ethcrypto/crypto.go
+2
-16
No files found.
ethcrypto/crypto.go
View file @
8ef17c2f
package
ethcrypto
package
ethcrypto
import
(
import
(
"code.google.com/p/go.crypto/ripemd160"
//"code.google.com/p/go.crypto/sha3"
"code.google.com/p/go.crypto/sha3"
"crypto/sha256"
"github.com/ethereum/eth-go/ethutil"
"github.com/ethereum/eth-go/ethutil"
"github.com/obscuren/sha3"
)
)
func
Sha256Bin
(
data
[]
byte
)
[]
byte
{
hash
:=
sha256
.
Sum256
(
data
)
return
hash
[
:
]
}
func
Ripemd160
(
data
[]
byte
)
[]
byte
{
ripemd
:=
ripemd160
.
New
()
ripemd
.
Write
(
data
)
return
ripemd
.
Sum
(
nil
)
}
func
Sha3Bin
(
data
[]
byte
)
[]
byte
{
func
Sha3Bin
(
data
[]
byte
)
[]
byte
{
d
:=
sha3
.
NewKeccak256
()
d
:=
sha3
.
NewKeccak256
()
d
.
Write
(
data
)
d
.
Write
(
data
)
...
...
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