Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
signature_util
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
huanyu
signature_util
Commits
8dffdcd8
Commit
8dffdcd8
authored
Nov 11, 2020
by
huanyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Java版 Filecoin 签名和地址生成
parent
b017e7d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
UnsignedMessageAPI.java
...java/com/blocksignature/signature/UnsignedMessageAPI.java
+3
-1
FilecoinUtil.java
src/main/java/com/blocksignature/utils/FilecoinUtil.java
+2
-2
No files found.
src/main/java/com/blocksignature/signature/UnsignedMessageAPI.java
View file @
8dffdcd8
package
com
.
blocksignature
.
signature
;
package
com
.
blocksignature
.
signature
;
public
class
UnsignedMessageAPI
{
import
java.io.Serializable
;
public
class
UnsignedMessageAPI
implements
Serializable
{
private
String
to
;
private
String
to
;
private
String
from
;
private
String
from
;
private
long
nonce
;
private
long
nonce
;
...
...
src/main/java/com/blocksignature/utils/FilecoinUtil.java
View file @
8dffdcd8
...
@@ -7,11 +7,11 @@ import org.bitcoinj.core.ECKey;
...
@@ -7,11 +7,11 @@ import org.bitcoinj.core.ECKey;
import
org.bitcoinj.core.Utils
;
import
org.bitcoinj.core.Utils
;
public
class
FilecoinUtil
{
public
class
FilecoinUtil
{
public
String
generateAddress
(
ECKey
ecKey
)
{
public
static
String
generateAddress
(
ECKey
ecKey
)
{
return
GenerateAddressUtil
.
generateAddress
(
ecKey
);
return
GenerateAddressUtil
.
generateAddress
(
ecKey
);
}
}
public
String
signatureTransaction
(
UnsignedMessageAPI
message
,
ECKey
ecKey
)
{
public
static
String
signatureTransaction
(
UnsignedMessageAPI
message
,
ECKey
ecKey
)
{
String
hexKey
=
Utils
.
HEX
.
encode
(
ecKey
.
getPrivKeyBytes
());
String
hexKey
=
Utils
.
HEX
.
encode
(
ecKey
.
getPrivKeyBytes
());
return
SignatureTransactionUtil
.
transaction_serialize
(
message
,
hexKey
);
return
SignatureTransactionUtil
.
transaction_serialize
(
message
,
hexKey
);
}
}
...
...
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