-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify about QR numeric encoding - is it unique to Smart Health Cards? #162
Comments
Agreed, naming is hard :-)
I have a nit-pick here: technically you're not turning a numeric QR into a B64 string -- you're turning it into a JWS, which includes three base64 strings separated by |
Thank for pointing out the b64 misnomer, sure it's a jws. I'm ultimately planning on using ruby-jws, right now just using some utility functions in it, and hacked-together ad-hoc code to decode and verify using bits of ruby-jws and bits of openssl. ruby-jws didn't anticipate the compressed payload, and so can't verify the jws (as opposed to the signature) without some way to tap into the decode chain. I will see if I wind up with something useful to contribute back to ruby-jws. from_shc_qr_numeric might be a good name. To String, it's just a String. The representation would seem to have use beyond Smart Health Cards, though. |
Depending on your goals, consider https://rubygems.org/gems/health_cards for ruby, too. |
Doing one of the hardest things in software development - naming! And I don't know what to call my little function that decodes the numeric QR code value to Base64.
Is this encoding scheme some standard, borrowed from somewhere else, or unique to Smart Health Cards?
If it is some standard, would be good to mention it, and then we know how to look for already-existing optimized implementations, rather than having the re-invent the wheel. (As I just have in Ruby...)
It is simple, easy to implement in any language (but perhaps one shouldn't have to) but, at least... what is it called?
It's a bit of a Caesar Cipher, but of course that's not it's purpose.
As it is, I'm going to turn it into a Ruby String extension, with the awkward named
shc_qrnum_to_b64
Which MIGHT be appropriate, if it is unique to Smart Health Cards.Yea, I should subclass
string
perhaps (me lazy) - then the function becomes justto_b64
but I still have the conundrum as to what to call the class.TL;DR Does the algorithm have a name? If so, can it get into the docs? If not, clarify it's not a common algorithm and is unique to Smart Health Cards.
The text was updated successfully, but these errors were encountered: