Skip to content

fix(ecdsa): correct unescape error in ECDSA Sign and Verify op#2076

Closed
Blank0120 wants to merge 2 commits into
gchq:masterfrom
Blank0120:master
Closed

fix(ecdsa): correct unescape error in ECDSA Sign and Verify op#2076
Blank0120 wants to merge 2 commits into
gchq:masterfrom
Blank0120:master

Conversation

@Blank0120

Copy link
Copy Markdown
Contributor

When using updateString or signString method in jsrsasign package, may case unexpected result because of jsrsasign using Deprecated method unescape. For example:

unescape(encodeURIComponent(String.fromCharCode(0x82))) // 'Â\x82'
decodeURIComponent(encodeURIComponent(String.fromCharCode(0x82))) //'\x82'

So should use updateHex, and signHex method, which could avoid this case.

example of CyberChef Link

@Blank0120 Blank0120 closed this May 20, 2026
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