How to Encrypt Sensitive Data in Microsoft Access

Поділитися
Вставка
  • Опубліковано 22 січ 2025

КОМЕНТАРІ • 31

  • @seanmackenziedataengineering

    Make sure to check out Part 2, including SHA256 one-way hashes for passwords ua-cam.com/video/2VrFXQd7xDQ/v-deo.html

  • @interestingamerican3100
    @interestingamerican3100 Рік тому +2

    This!!! This is what I wanted to learn. Thank you!

  • @gerfer6261
    @gerfer6261 Рік тому +1

    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

  • @Khabat.Hawrami
    @Khabat.Hawrami Рік тому +1

    Always one of the best.

  • @LeonardoSassoischia
    @LeonardoSassoischia Рік тому +1

    Sean sei un grande!!! Grazie.

  • @miles6875
    @miles6875 Рік тому +1

    Thank you, Sean!!

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  Рік тому +1

      My pleasure!

    • @miles6875
      @miles6875 Рік тому +1

      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

  • @franciscocarreon9034
    @franciscocarreon9034 Рік тому +1

    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.

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  Рік тому

      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!

  • @michaelkrailo5725
    @michaelkrailo5725 Рік тому +1

    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.

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  Рік тому

      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!

  • @rufi4you
    @rufi4you 9 місяців тому +1

    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?

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  8 місяців тому

      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

  • @Pelsken
    @Pelsken 4 місяці тому

    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!!

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  4 місяці тому

      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.

  • @b-hack
    @b-hack Рік тому +1

    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.

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  Рік тому

      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!

  • @simonmaersk
    @simonmaersk Рік тому +1

    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.

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  Рік тому

      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?

  • @simonmaersk
    @simonmaersk Рік тому +1

    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

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  Рік тому +2

      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.

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  Рік тому

      I added one way SHA256 functions to the latest version for this purpose. Thanks for suggesting! ua-cam.com/video/2VrFXQd7xDQ/v-deo.html

    • @simonmaersk
      @simonmaersk Рік тому

      @@seanmackenziedataengineering awesome! I'll check it out. Thanks!

  • @luciushigh7854
    @luciushigh7854 Рік тому

    💃 Promo*SM