Skip to content

Conversation

@comotion
Copy link

if length < data.length, the byte should be cleared and the new values
should be right-adjusted. Otherwise, the container no longer represents
the bytearray/BigInteger correctly.

See #209

if length < data.length, the byte should be cleared and the new values
should be right-adjusted. Otherwise, the container no longer represents
the bytearray/BigInteger correctly.

See licel#209
@comotion
Copy link
Author

https://github.com/martinpaljak/jcardsim/blob/next/simulator/src/main/java/com/licel/jcardsim/crypto/ByteContainer.java#L119

The this.length = data.length change is important because otherwise the length is incorrect when the container is resized, causing intermittent crypto failures. I see the linked code is missing that line.

@martinpaljak nice to see your fork. Are you interested in other PRs, like for instance reconnect support in the VSmartCard interface?

@martinpaljak
Copy link

@comotion If that would be missing - yes. There's not yet public usage guide documentation, but I would expect "plausible UX" in the end.

@martinpaljak
Copy link

I've not yet reached the point where I look at the implementation of crypto functions, the XXX comment shall disappear when I do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants