How to Encrypt Sensitive Data in Microsoft Access

Поділитися
Вставка
  • Опубліковано 19 вер 2024
  • Sometimes in our databases we need to encrypt certain fields, like password fields (see comments for hashed pwd video) or other sensitive data. In Microsoft Access, this is also possible by using various techniques, usually by integrating with some plug ins or third party dll libraries. However, there are not many simple, easy to install solutions, and so in this episode, I'll show you how to use a few simple add-ins that I created to enable field encryption in your database, using a .net helper I wrote that you can call from MS Access. Let's go encrypt some data!]
    Related Videos:
    How to disable and enable the Bypass Key on your MS Access app so users cannot bypass Autoexec/Forms
    • How to disable and ena...
    Link and Relink Your Access Front-End App Using vbScript and a Table-Based Approach
    • Link and Relink Your A...
    How to Use vbScript to Relink Your User's MS Access Application Front-End Automatically
    • How to Use vbScript to...
    Use vbScript to Deploy your Access Front End, Create Shortcuts, and Check for Updates on User Login
    • Use vbScript to Deploy...
    How to Encrypt and Hash Passwords in MS Access
    • How to Encrypt and Has...
    How to Encrypt Sensitive Data in Microsoft Access
    You are watching this video now!
    How to Kick Users out of Your MS Access Database
    • How to Kick Users out ...
    How to Get the IP Address in Microsoft Access
    • How to Get the IP Addr...
    How to Get the Windows Username in MS Access
    • How to Get the Windows...
    How to Set Basic Startup Options on Your Microsoft Access Database
    • How to Set Basic Start...
    See how to build the EncryptConnectStrings.exe in my video here:
    • How to Encrypt and Dec...
    This video uses concepts and the exe uses code from here. Please read it to understand which encryption we're using and how it is deployed:
    learn.microsof...
    Join me on Patreon!
    / mackenziedataengineering
    Demo of my BZ RDP Cloaker:
    www.patreon.co...
    Check out some tech (and support my channel!):
    www.amazon.ca/...
    Want the code from this video?
    mackenziemacken...
    Interested in transforming your career or finding your next gig?
    system.billzon...
    Want my team to do a project for you? Let's get to it!
    system.billzon...
    Contact form you can find at www.mackenziema...
    Follow me on social media:
    / mackenziedataanalytics
    / seamacke
    / seamacke
    / seamacke
    / psmackenzie
    Get Microsoft Office including Access:
    click.linksyne...
    Got a UA-cam Channel? I use TubeBuddy, it is awesome. Give it a try:
    www.tubebuddy....
    #msaccess #encryption

КОМЕНТАРІ • 29

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

  • @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

  • @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

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

    Sean sei un grande!!! Grazie.

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

    Always one of the best.

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

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

  • @rufi4you
    @rufi4you 4 місяці тому +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  4 місяці тому

      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

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

  • @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?

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

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

    💃 Promo*SM