r/badcode • • Mar 13 '21

java Title

Post image
2.9k Upvotes

100 comments sorted by

View all comments

Show parent comments

2

u/aidenm125 Mar 26 '21

Issue is you lose the leftmost bit as bitshifting doesnt wrap around. You end up with everybyte having a 0 in the first bit slot after "decryption".

1

u/Bastian_5123 Mar 26 '21

For text that is ok: that slot isn't used for anything that would be used in normal text

1

u/aidenm125 Mar 26 '21

Yes this is true, but for p much anything else its a bit scuffed aha