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
This is neat! one thing you should be aware of is that it's illegal for a utf8 string to encode a unicode codepoint in more bytes than the least possible. for example it's only legal to encode character 0x41 = 0b01000001 'A' as 01000001 (and not 11000001 10000001). in utf8 land this is called an "overlong form" https://kevinboone.me/overlong.html?i=1
i think it's possible for your cipher to end up emitting an overlong form, e.g. if you encode two \0 chars in a row
Let's write some tests to ensure we're never overlong
The text was updated successfully, but these errors were encountered:
From @Cwillmore on discord
Let's write some tests to ensure we're never overlong
The text was updated successfully, but these errors were encountered: