⚕ÐɌ ŠŦɆɅɆ
⚜ӍʘɌɌɆѦŁɆ

ŝčϻ

ENCODING DATA

SCAN THE QRCODE BELOW TO VIEW ENCODED DATA:

GRAB YOUR CELLPHONE AND HAVE SOME FUN WITH THE CAMERA'S QRCODE SCANNING FEATURE!

That QRCODE was made with a command line program called

qrencode
Here's how it is used:

$ echo "MESSAGE TO ENCODE" | qrencode -t png -o qrcodemessage.png

It can be then embedded into an HTML file by using

base64
to convert any file to a base64 set of data may be input directly into the html code as per below:

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJMAAACTAQMAAACwK7lWAAAABlBMVEUAAAD///+l2Z/dAAAAAnRS
TlP//8i138cAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAILSURBVEiJ3ZY9jqQwEIULOXDWXMCSr+HM
V4IL0HABuJIzX8OSL4AzBxa1jxlGM9ImrtUGq7UI6C+orvfqxxD/fui/ZifRRG2OaebMgQYJK9ze
VZWaFmfGiJ8SFszMvLo2cnpHmqWsGnJpqOZPWDQL0RxIzLgtlCZtS7THt7YuBv8Q73m+Pe1i9wlt
qOoke/yoZQ87UTTYH/jU5uU/dXQzb4/KG9NcaXKPjk52ufRyiistrpFG9QSsQIHDY14agRVL2KnT
y6PmqJsZaholrAQ0qYV5l+YjtlnEqplc+jAAOMkY56O26dahLv9o62TQMWIiGY2Wt69e62TXbTyG
oxFeojokjCNNWq3OrpoWMm8Ru7uMFo9IqsQ2SFjhNLk2xFwYfWpGCbtI7d5yRFKYTrVJWKk0hIws
MBwTfdWyj10ub5x3j0h5Jcsy1rB+sPzmkDk+OnqZ510jEehASDNL2K2DzaQTNvfu8yZhl77no7A6
Kgx4dHSy09MYEMyiSVf69L6XcbQroU9hA2qei4SViD1kBmRR0xvzLWHolN3xFvLpYGR6S9iFK5Hb
XNvikRSNEoaD/z/uOxkv9pAw3DML5S2AmSHK2H2fRz5dWjQKroqIBbN47L8MJ85Hh4BNpFYEQyLh
2YkChn1QcaWr9at3exlj6UKH3TUNz/7rZR/fTTAA1cMOYxH72996/zb7BYMFUKALUyDoAAAAAElF
TkSuQmCC">

Another interesting CLI program can read a qrcode and output the scan result (the image shown at the top was stored locally on my machine here's my commands to read it):

Command:

zbarimg --raw --quiet 2024_copyright_SCM.png

Output:

© 2024 ŝčϻ, (ÐɌ⚕ ŠŦɆɅɆ ⚜ӍʘɌɌɆѦŁɆ) Steven C. Morreale, M.D./M.P.H.  All Rights Reserved. https://drmorreale.com

Note: Depending upon the QRSCANNING software being used the way the code is interpreted may vary. I tried it on Android phone and it works fine, shows me the text and a preview for the website link.

However, a friend scanned it with an iPhone and it simply went to the website, didn't show the copyright information.

There are various formats for QRENCODING such as to email, text, dial a phone number or to share a vcard (contact information).

USE CASE(S)

SPECIAL THANKS TO Kris Occhipinti for his youtube videos! Check him out Films By Kris on youtube!

I am thinking some of my photographs could have a QRCODE put on them to show the copyright and to provide a link to my website or contact information.

OPENSSL TO ENCRYPT AND DECRYPT INFORMATION

Some fun code

openssl is either installed or is available in linux repositories. Let's encrypt something with it using the following code:

echo "© 2024 ŝčϻ, (ÐɌ⚕ ŠŦɆɅɆ ⚜ӍʘɌɌɆѦŁɆ) Steven C. Morreale, M.D./M.P.H.  All Rights Reserved. https://drmorreale.com" | openssl enc -e -aes-256-cbc -pbkdf2 -a -pass pass:copyright
The above code will echo some text, pipe that text to openssl with commands to use aes-256-cbc encryption and -pbkdf2 salt algorithm. It isn't ideal but I do put in the password otherwise it would be prompted. Here's the result:
U2FsdGVkX18UYQ0JgfDbz4vfKa5RqjZ3uopcGN6CiIAQ9Zlcf0l0XhNlFvk2/Q6p
n7bqyG4T+SOGcv0QKdjkvOR3XUC8tmJy60Abavmnwgm3h6RCOCVFZ/fC8zptM1e5
B0W2jvnVPntn/tXZNwiv/4ZAU6hxWuFzLkrMi9PnfFFtQHfnwoHtZJyVm/KxR8t7
SAI1N+3M/EDgc3m8ZXkGBw==

To decrypt the above data... which is easy data to share in plain text... you'd simply echo it or feed it in with a cat command and a pipe to openssl with the cipher and salt algorithms, you can put the passphrase in the command or it will prompt for it.

echo "U2FsdGVkX18UYQ0JgfDbz4vfKa5RqjZ3uopcGN6CiIAQ9Zlcf0l0XhNlFvk2/Q6p
n7bqyG4T+SOGcv0QKdjkvOR3XUC8tmJy60Abavmnwgm3h6RCOCVFZ/fC8zptM1e5
B0W2jvnVPntn/tXZNwiv/4ZAU6hxWuFzLkrMi9PnfFFtQHfnwoHtZJyVm/KxR8t7
SAI1N+3M/EDgc3m8ZXkGBw==" |  openssl enc -d -aes-256-cbc -pbkdf2 -a -pass pass:copyright
Notice that the openssl enc -d which means decrypt versus the earlier code with was enc -e for encrypt. The output of the decrypted data:
© 2024 ŝčϻ, (ÐɌ⚕ ŠŦɆɅɆ ⚜ӍʘɌɌɆѦŁɆ) Steven C. Morreale, M.D./M.P.H.  All Rights Reserved. https://drmorreale.com

Here's what the command to decrypt some openssl data would look like without the password option, so the password will be prompted:

echo "U2FsdGVkX18UYQ0JgfDbz4vfKa5RqjZ3uopcGN6CiIAQ9Zlcf0l0XhNlFvk2/Q6p
n7bqyG4T+SOGcv0QKdjkvOR3XUC8tmJy60Abavmnwgm3h6RCOCVFZ/fC8zptM1e5
B0W2jvnVPntn/tXZNwiv/4ZAU6hxWuFzLkrMi9PnfFFtQHfnwoHtZJyVm/KxR8t7
SAI1N+3M/EDgc3m8ZXkGBw==" | openssl enc -d -aes-256-cbc -pbkdf2 -a

enter AES-256-CBC decryption password:

© 2024 ŝčϻ, (ÐɌ⚕ ŠŦɆɅɆ ⚜ӍʘɌɌɆѦŁɆ) Steven C. Morreale, M.D./M.P.H.  All Rights Reserved. https://drmorreale.com

Putting it all together

So let's say we want to share a cipher code and the command to decrypt it with openssl, this could be done with multiple or a single qrcode! Just use

qrencode
and share the image which will permit copy/paste into another device and the command line. I just scanned the QRCODE on my android, copied the text command and used paste in termux, it prompted for the password, which I entered and saw the plain text message in my terminal!

LINKS