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
b56aee36
Unverified
Commit
b56aee36
authored
Jan 06, 2017
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mobile: rename passphrase signing method to avoid Swift rewrite
parent
e0fde022
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
accounts.go
mobile/accounts.go
+3
-3
android_test.go
mobile/android_test.go
+1
-1
No files found.
mobile/accounts.go
View file @
b56aee36
...
...
@@ -115,10 +115,10 @@ func (am *AccountManager) Sign(address *Address, hash []byte) (signature []byte,
return
am
.
manager
.
Sign
(
address
.
address
,
hash
)
}
// Sign
WithPassphrase signs hash if the private key matching the given address
//
can
be decrypted with the given passphrase. The produced signature is in the
// Sign
Passphrase signs hash if the private key matching the given address can
// be decrypted with the given passphrase. The produced signature is in the
// [R || S || V] format where V is 0 or 1.
func
(
am
*
AccountManager
)
Sign
With
Passphrase
(
account
*
Account
,
passphrase
string
,
hash
[]
byte
)
(
signature
[]
byte
,
_
error
)
{
func
(
am
*
AccountManager
)
SignPassphrase
(
account
*
Account
,
passphrase
string
,
hash
[]
byte
)
(
signature
[]
byte
,
_
error
)
{
return
am
.
manager
.
SignWithPassphrase
(
account
.
account
,
passphrase
,
hash
)
}
...
...
mobile/android_test.go
View file @
b56aee36
...
...
@@ -69,7 +69,7 @@ public class AndroidTest extends InstrumentationTestCase {
Hash txHash = new Hash("0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef");
// Sign a transaction with a single authorization
byte[] signature = am.sign
With
Passphrase(signer, "Signer password", txHash.getBytes());
byte[] signature = am.signPassphrase(signer, "Signer password", txHash.getBytes());
// Sign a transaction with multiple manually cancelled authorizations
am.unlock(signer, "Signer password");
...
...
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