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
6f21520a
Commit
6f21520a
authored
Apr 04, 2019
by
Guillaume Ballet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More review feedback
parent
fc3000d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
apdu.go
accounts/scwallet/apdu.go
+5
-0
No files found.
accounts/scwallet/apdu.go
View file @
6f21520a
...
...
@@ -19,6 +19,7 @@ package scwallet
import
(
"bytes"
"encoding/binary"
"fmt"
)
// commandAPDU represents an application data unit sent to a smartcard.
...
...
@@ -66,6 +67,10 @@ type responseAPDU struct {
// deserialize deserializes a response APDU.
func
(
ra
*
responseAPDU
)
deserialize
(
data
[]
byte
)
error
{
if
len
(
data
)
<
2
{
return
fmt
.
Errorf
(
"can not deserialize data: payload too short (%d < 2)"
,
len
(
data
))
}
ra
.
Data
=
make
([]
byte
,
len
(
data
)
-
2
)
buf
:=
bytes
.
NewReader
(
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