Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
Fido2Applet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Wen Wei Li
Fido2Applet
Commits
803cd23e
Commit
803cd23e
authored
Jan 03, 2023
by
Josh Ji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plusOne()
parent
617ba2a4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
src/main/java/com/josh/vku2f/IDSecret.java
src/main/java/com/josh/vku2f/IDSecret.java
+21
-0
No files found.
src/main/java/com/josh/vku2f/IDSecret.java
View file @
803cd23e
...
...
@@ -160,6 +160,27 @@ public class IDSecret {
return
encoder
.
getCurrentOffset
();
}
/**
* plus one to an unsigned integer byte array
* @param input unsigned integer
*/
public
void
plusOne
(
byte
[]
input
){
short
i
=
(
short
)(
input
.
length
-
1
);
byte
bitFlag
=
(
byte
)
0x01
;
while
(
i
>=
0
){
input
[
i
]^=
bitFlag
;
if
((
input
[
i
]&
bitFlag
)==
bitFlag
)
break
;
else
{
bitFlag
<<=
1
;
if
(
bitFlag
==
0
){
bitFlag
=(
byte
)
0x01
;
i
--;
}
}
}
}
private
void
testSharedObjects
(
byte
[]
apduBuffer
){
byte
[]
aid
=
new
byte
[]{(
byte
)
0xa0
,(
byte
)
0x00
,(
byte
)
0x00
,(
byte
)
0x02
,(
byte
)
0x47
,(
byte
)
0x10
,(
byte
)
0x01
};
...
...
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