Senin, 06 Juni 2016

RE: [MS_AccessPros] Re: Encrypted passwords in table

 

Thanks Bill,

That looks really useful, I'll give it a go later.

The front-end database is a .MDE file, so the users can't access the code.

 

Regards,

Andrew

 

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: 06 June 2016 19:11
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Re: Encrypted passwords in table

 

 

Andrew

 

I use a function written by Arvin Meyer. I've posted it to our files>Encrypt_Decrypt_usesKey.txt. You send the string you want encrypted/decrypted along with the key string. I usually hide the key as a database property under some innocuous  property name like "Department" or "Document number" and set that property to the value of the key string. Then I call the function like this:

strMyPassword = Encrypt("myPassword", GetSummaryInfo("Document number", False, "Custom")

 

GetSummaryInfo function:

 

Public Function GetSummaryInfo(strPropName As String, _

                               Optional IsAddin As Boolean = False, _

                               Optional strType As String = "Summary") As String

'Purpose  : Get Summary or Custom info such as Title for current project

'DateTime : 8/09/2010 11:41

'Author   : Bill Mosca

    Dim dbs As DAO.Database, cnt As DAO.Container

    Dim doc As DAO.Document, prp As DAO.Property

    Const conPropertyNotFound = 3270

 

    On Error GoTo err_PROC

 

    'If information belongs to an add-in, use the add-in's database.

    If IsAddin = True Then

        Set dbs = CodeDb

    Else: Set dbs = CurrentDb

    End If

 

    Set cnt = dbs.Containers!Databases

    Select Case strType

        Case "Summary"

            Set doc = cnt.Documents!SummaryInfo

        Case "Custom"

            Set doc = cnt.Documents!UserDefined

    End Select

 

    doc.Properties.Refresh

    GetSummaryInfo = doc.Properties(strPropName)

 

exit_PROC:

    Exit Function

 

err_PROC:

    GetSummaryInfo = ""

    Resume exit_PROC

 

End Function

 

 

When you look at the encrypt function you will see it works both ways. Making the front end an ACCDE file will strip out the code so your users won't be able to see the function and crack the stored password. The encrypted password in the table will be completely unreadable.

 

Regards,

Bill Mosca, Founder - MS_Access_Professionals

Microsoft Office Access MVP

My nothing-to-do-with-Access blog

 



---In MS_Access_Professionals@yahoogroups.com, <andrew@adwsystems.co.uk> wrote :

Hi All,
Does anyone have any pointers on how best to generate encrypted passwords that are stored in a table?  They need to be able to be unencrypted as well, so a one-way hashing algorithm wouldn't be much use.  Using MS Capicom seems to have been the favoured way in the past, but it's been deprecated and is no longer supported by MS.

Thanks,
Andrew

 

 

__._,_.___

Posted by: Andrew Wilson <andrew@adwsystems.co.uk>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar