openpgpjs / sop-openpgpjs

Other
2 stars 1 forks source link

sop-openpgpjs doesn't handle 8-bit data correctly #4

Closed teythoon closed 4 days ago

teythoon commented 1 year ago

Seems it is replaced with the unicode REPLACEMENT CHARACTER suggesting a superfluous conversion to a string somewhere:

% echo -ne 'what is\xff\xff\xff\xff\xffhappening' | sqop encrypt alice-secret.pgp | sop-openpgp decrypt alice-secret.pgp | hd
00000000  77 68 61 74 20 69 73 ef  bf bd ef bf bd ef bf bd  |what is.........|
00000010  ef bf bd ef bf bd 68 61  70 70 65 6e 69 6e 67     |......happening|
0000001f