You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original text: 120,156,75,244,51,201,14,14,45,9,41,203,1,0,18,222,3,161
Base45 encoded: 6BF4R9RO6/Y19V5YC5V50FH2TK0
Base45 decoded: 120,156,75,244,51,201,14,14,45,9,41,203,0,256,18,222,3,161
Is it normal that the decoded Uint8Array is not equals to the one provided for encode ?
Please note that the decoded Uint8Array generates an error when using zlib.inflate() function from https://github.com/nodeca/pako, but not the original one:
I can confirm the current version has several bugs (it fails to decode to the original payload in about 10% of the DGCs I create) and the version at EHN DGC seems to work flawlessly.
Activity
dirkx commentedon Apr 23, 2021
This is absolutely a bug !
raziel057 commentedon Apr 23, 2021
Thanks.
Please note that I don't have this issue if I use the following implementation: https://github.com/ehn-digital-green-development/base45-js
vitorpamplona commentedon May 6, 2021
@dirkx can you merge from https://github.com/ehn-digital-green-development/base45-js and release a new version?
I can confirm the current version has several bugs (it fails to decode to the original payload in about 10% of the DGCs I create) and the version at EHN DGC seems to work flawlessly.
vitorpamplona commentedon May 6, 2021
If you want to add another test case that fails in the production version but passes on the EHN DGC version
pp-ps commentedon Jun 21, 2021
@raziel057 I happened to experience the same issue, it should be fixed in latest main after 1c53b26.
vitorpamplona commentedon Jun 21, 2021
I have had new decoding problems with 1c53b26, so I moved out to this library which seems to have everything fixed. https://www.npmjs.com/package/base45.
pp-ps commentedon Jun 21, 2021
@vitorpamplona I have not caught any error yet, do you have a test case?
vitorpamplona commentedon Jun 21, 2021
Sorry, not really. I was basically doing
and when both of them were crashing I just gave up on the lib.