This is something similar what I need in my alleyway Need to go over this few times to understand Thank you,please don’t close the chapter Keep adding and very relevant for current days to keep 👹away
I love how you ended the video with a instrumental as audio and simple notes as a summary. Very progressive channel, especially for a technology like MS access! ;) @seanmackenziedataengineering
Hi Sean, thanks for the input, but I have a problem. when decrypting a text it is the same but its length is always greater than the original. Example 12345 its length is 5 but after decryption its length is 7. You will know what it is due to. Thank you.
Good test! It seems like sometimes the return string receives a Enter key (or vbCrLF) on the end. If you see this, you can add one line to EncryptOrDecrypt, just AFTER the Fn_Exit: line If Right(strReturn, 2) = vbCrLf Then strReturn = Left(strReturn, Len(strReturn) - 2) Give it a try and let me know how it goes!
Is there any way you can prevent that cmd window from flashing on screen during the Encrypt process? I like your app, but that cmd flash doesn't look very professional. Maybe run your code in a minimized cmd window or hidden in the background window would take care of this problem. I see you have an updated version of this with the SHA256 hash in the other video, so I guess that's the version to update instead of this one.
You bet! It is just a slightly different kind of deployment. It is possible to use objShell.Run in our VBA instead of Execute. Using Run instead of Execute does not have the feature where we can capture the output "on-the-fly", but is does allow us to run the command in a minimized or hidden window. Since we cannot get the return value from the output window with Run, we have to direct the output to a text file somewhere, which we can by specifying this in the command line. After the text file is created, we can read it and get our value, then resume. Notice that this will not change our exe file at all. We just change our VBA. The downside is that it will leave a text file on your drive, in some cases with unencrypted data that you don't want others to see outside of your app. For password hashes (in the next video as you mentioned ua-cam.com/video/2VrFXQd7xDQ/v-deo.html), this is not as big of a deal, but for other data be aware that some drive data will be left in a txt somewhere that you need to delete (maybe we can delete it after we read it with VBA). When I get a chance, I'll post here the VBA alternate way to deploy it!
Hi, great video thanks. I wonder, is data encryption / decryption and hashing possible directly in Access (without an external program)? If so, how does this work?
The answer to this is "kinda sorta".. You can indeed write encryption algorithms, but with (in my experience) much more difficulty. This is partly due to the fact that VBA is pretty old. 25 years ago, encryption was not the same as it is today, and Windows was not the same, and encryption deployments were not the same. So, if you write something in vbScript or VBA, you have to leap forward in time from their last major releases (afaik 1999) to use stronger methods etc. Sure, you can find some DLL or something to put in your project to do it but then.. ..you're just using another program like you see here. Dot net is newer and has built-in stuff to work with newer Windows environments easily and directly, modern encryption tech directly (like 256-bit encryption), and other modern dot net technologies. So, for me, it was the fastest, best option to completion for the least amount of effort. Also, using dot net Framework via a console app means that it will run on just about any version of Windows (with no or little update) back by a decade and almost for sure forward by more than a decade. It will be a stable solution. Edit: spelling
Hi Sean, I need some help. I like to store a password in a config file like you used. I want that password converted in to a cypher like you showed and i want to be able to retreive the password when needed in my access vba code. I don't know how to do this and i don't want to hardcode a password into my vba code. Can you help me? Thanks in advance!!
If you are specifically interested in passwords, make sure to check out ua-cam.com/video/2VrFXQd7xDQ/v-deo.html where I allow you to store an encrypt/hash combo. Maybe you could store the hash in your code instead.
Very helpful although it would be nice if you could show how to encrypt & decrypt all txt records in a given field/table upon open/close of the frontend, i.e. sensitive data such as credit card #. Perhaps there's a better approach such as encrypt/decrypt a entire table or linking/unlinking backend tables based on user roles upon login.
That's a great idea - you could probably decrypt the parts that you know you'll be working on or something like that. Decrypting all the data in a field might take some time but you could roll through and decrypt that field in the morning before starting using something like this: ua-cam.com/video/7HckYjH_wg4/v-deo.html Maybe get a coffee while it is running!
Hi Shawn. Me again. What would you recommend for hashing user passwords? I'm kinda having a hard time deciding what the best technique is, without having to install some third-party library on all my users' computers.
Great question. That's always the trick.. trying not to install a bunch of libraries etc. There is a nice way to do it using installed .net libraries, so I may just add this to my SmackoCrypt exe as an alternate call that returns only True or False when you input user/pwd combos. Stay tuned. Which methods have you looked at so far?
This is cool, thank you! This is useful for encrypting data in the database itself, but I don't think this should be used for passwords. Those should be hashed instead and never decrypted
Good point! That would certainly add some security. An admin could also use a different passphrase combo just for the password operation, with different parameters that are only used for that purpose.
Make sure to check out Part 2, including SHA256 one-way hashes for passwords ua-cam.com/video/2VrFXQd7xDQ/v-deo.html
This!!! This is what I wanted to learn. Thank you!
Glad it was helpful!
This is something similar what I need in my alleyway
Need to go over this few times to understand
Thank you,please don’t close the chapter
Keep adding and very relevant for current days to keep 👹away
Glad it was helpful! Thanks for your suggestion on this earlier. It is a great topic!
Always one of the best.
Many thanks!
Sean sei un grande!!! Grazie.
Grazie!
Thank you, Sean!!
My pleasure!
I love how you ended the video with a instrumental as audio and simple notes as a summary. Very progressive channel, especially for a technology like MS access! ;) @seanmackenziedataengineering
Hi Sean, thanks for the input, but I have a problem. when decrypting a text it is the same but its length is always greater than the original.
Example 12345 its length is 5 but after decryption its length is 7.
You will know what it is due to.
Thank you.
Good test! It seems like sometimes the return string receives a Enter key (or vbCrLF) on the end. If you see this, you can add one line to EncryptOrDecrypt, just AFTER the Fn_Exit: line
If Right(strReturn, 2) = vbCrLf Then strReturn = Left(strReturn, Len(strReturn) - 2)
Give it a try and let me know how it goes!
Is there any way you can prevent that cmd window from flashing on screen during the Encrypt process? I like your app, but that cmd flash doesn't look very professional. Maybe run your code in a minimized cmd window or hidden in the background window would take care of this problem. I see you have an updated version of this with the SHA256 hash in the other video, so I guess that's the version to update instead of this one.
You bet! It is just a slightly different kind of deployment. It is possible to use objShell.Run in our VBA instead of Execute. Using Run instead of Execute does not have the feature where we can capture the output "on-the-fly", but is does allow us to run the command in a minimized or hidden window.
Since we cannot get the return value from the output window with Run, we have to direct the output to a text file somewhere, which we can by specifying this in the command line. After the text file is created, we can read it and get our value, then resume.
Notice that this will not change our exe file at all. We just change our VBA.
The downside is that it will leave a text file on your drive, in some cases with unencrypted data that you don't want others to see outside of your app. For password hashes (in the next video as you mentioned ua-cam.com/video/2VrFXQd7xDQ/v-deo.html), this is not as big of a deal, but for other data be aware that some drive data will be left in a txt somewhere that you need to delete (maybe we can delete it after we read it with VBA).
When I get a chance, I'll post here the VBA alternate way to deploy it!
Hi, great video thanks. I wonder, is data encryption / decryption and hashing possible directly in Access (without an external program)? If so, how does this work?
The answer to this is "kinda sorta".. You can indeed write encryption algorithms, but with (in my experience) much more difficulty. This is partly due to the fact that VBA is pretty old. 25 years ago, encryption was not the same as it is today, and Windows was not the same, and encryption deployments were not the same. So, if you write something in vbScript or VBA, you have to leap forward in time from their last major releases (afaik 1999) to use stronger methods etc. Sure, you can find some DLL or something to put in your project to do it but then.. ..you're just using another program like you see here. Dot net is newer and has built-in stuff to work with newer Windows environments easily and directly, modern encryption tech directly (like 256-bit encryption), and other modern dot net technologies. So, for me, it was the fastest, best option to completion for the least amount of effort. Also, using dot net Framework via a console app means that it will run on just about any version of Windows (with no or little update) back by a decade and almost for sure forward by more than a decade. It will be a stable solution.
Edit: spelling
Hi Sean, I need some help. I like to store a password in a config file like you used. I want that password converted in to a cypher like you showed and i want to be able to retreive the password when needed in my access vba code. I don't know how to do this and i don't want to hardcode a password into my vba code. Can you help me? Thanks in advance!!
If you are specifically interested in passwords, make sure to check out ua-cam.com/video/2VrFXQd7xDQ/v-deo.html where I allow you to store an encrypt/hash combo. Maybe you could store the hash in your code instead.
Very helpful although it would be nice if you could show how to encrypt & decrypt all txt records in a given field/table upon open/close of the frontend, i.e. sensitive data such as credit card #. Perhaps there's a better approach such as encrypt/decrypt a entire table or linking/unlinking backend tables based on user roles upon login.
That's a great idea - you could probably decrypt the parts that you know you'll be working on or something like that. Decrypting all the data in a field might take some time but you could roll through and decrypt that field in the morning before starting using something like this: ua-cam.com/video/7HckYjH_wg4/v-deo.html Maybe get a coffee while it is running!
Hi Shawn. Me again. What would you recommend for hashing user passwords? I'm kinda having a hard time deciding what the best technique is, without having to install some third-party library on all my users' computers.
Great question. That's always the trick.. trying not to install a bunch of libraries etc. There is a nice way to do it using installed .net libraries, so I may just add this to my SmackoCrypt exe as an alternate call that returns only True or False when you input user/pwd combos. Stay tuned. Which methods have you looked at so far?
This is cool, thank you! This is useful for encrypting data in the database itself, but I don't think this should be used for passwords. Those should be hashed instead and never decrypted
Good point! That would certainly add some security. An admin could also use a different passphrase combo just for the password operation, with different parameters that are only used for that purpose.
I added one way SHA256 functions to the latest version for this purpose. Thanks for suggesting! ua-cam.com/video/2VrFXQd7xDQ/v-deo.html
@@seanmackenziedataengineering awesome! I'll check it out. Thanks!
💃 Promo*SM
🙃