markusfisch / BinaryEye

Yet another barcode scanner for Android
https://play.google.com/store/apps/details?id=de.markusfisch.android.binaryeye
MIT License
1.26k stars 108 forks source link

[Feature request] Display hash at the bottom of the results #452

Closed spacesynth closed 2 months ago

spacesynth commented 2 months ago

I’m grateful for Binary Eye’s ability to simultaneously display hex values and text. I frequently scan large 2D codes, such as my train ticket, to determine if I need to replace it with a newer version in my Android wallet.

Since the mask patterns are not always the same in the ticket, a comparison by eye is unreliable.

These data fields aren’t human-readable either, but a hash beneath the results (like the popular SHA256) would make it easier to identify changes when comparing two large 2D barcodes. While this may be a niche use case, it’s a practical solution for comparing non-human readable data.

markusfisch commented 2 months ago

This is a really good idea! 👍

I just think that a SHA256 would probably be a bit too long and therefore maybe not always very helpful. I quicky hacked something together to show a SHA1, SHA256, MD5 and CRC4 for comparison:

screencap-20240424193119

I would choose the shortest checksum. What do you think?

spacesynth commented 2 months ago

This looks great and I love you want to add it! Any checksum is good, but be prepared that people will judge us if we opt for md5 or sha1 since they are considered unsafe (only when used in actual cryptography) but people will disregard that other use cases are legitimate.

else a pseudocode example for sha256_with_newline = sha256[0:31]+"\n"+sha256[32:63]+" (SHA256)" to wrap it? Trying to improve readability by putting the hash name behind the string.

9A7CD5EFDA286FBCDD26F89E64A360C5
60208248B301FF49AD670CB5552790FF (SHA256)

Whilst I use it for tickets, I don't know what they might use it for, but I see how some fans of cryptocurrencies and printo out paper wallets as backups, or a more common usecase for devs:
You backup an ssh_priv.key and you sha256sum the data on your machine and sha256 sum the data from the QR.

Practical for verification when exporting important data. If I can convince you to use an ugly 64 characters split in half over a newline, maybe people will not hate me for saying: "Yeah, md5 would be fine to, but..."

No matter how you decide one hash might be enough, many thanks! I don't want to start the feature creep. Else a dropdown menu in options to select one would be okay. But I really would feel guilty to make you go out of your way and implement more than one feature for a request by a stranger.

markusfisch commented 2 months ago

I finally decided to add a setting to choose the hashing algorithm.

There's a new version 1.63.8 which should become available on Google Play soon!

spacesynth commented 2 months ago

Thank you! Also writing to suggest something: Among artists I've supported Ko-Fi is pretty popular. They are exactly like buymeacoffee, but they still offer PayPal. Sender and receiver private data are safeguarded from each other, there are no fees.

So I would donate if you would off more flexible services than buymeacoffee and less volatile ones like bitcoin. Unless you don't have a PayPal Ko-Fi does everything better than the current methods. https://buymeacoffee.com/instasprayers/changes-payment-due-buy-coffee-using-paypal-anymore

https://ko-fi.com/ This is not an ad, just a suggestion for hidden free support for developers. Cheers! Hope I can send some green for a real IRL coffee.

markusfisch commented 2 months ago

Thanks for the tip! I'm still trying to find my way with all these donation platforms 😉

So I just created an account on Ko-Fi and added a button to the README 😄

spacesynth commented 2 months ago

grafik

Thanks for your trust in a new system that works better for me! Money should be yours now and glad to have a friendly dev open to feature requests. This is now backed.

markusfisch commented 2 months ago

Thank you very much! And thank you for using Binary Eye and for contributing this idea!