John, you are exactly right. To be perfectly honest, I did not consider this in the article to not open the ‘can of worms’ that is cryptography. It is not my strongest suit, and I chose not to make assumptions about how to securely encrypt data in this article.
I did however think of this after publishing it. This is a great idea and I’ll definitely use it and dig deeper in the topic.
As you said, there is some added complexity in ensuring secure encryption takes place. But I’ll definitely implement this in my next projects.
Thanks mate.