Gå til innhold

Lagre informasjon kryptert i Microsoft Access


Anbefalte innlegg

  • 2 uker senere...
Videoannonse
Annonse
Er dette mulig?

7083326[/snapback]

Har ikke satt meg stort inn i kryptering av data i Access, men har ved en tidligere anledning brukt denne krypteringen av data:

 

Public Function PerformEncryption(ByRef strPassword As String, ByVal boo As Boolean) As String
   ' boo = True then Encrypt, boo = False then Decrypt
   
   Dim strCode As String, intCounter As Integer

   For intCounter = 1 To Len(strPassword)
       If intCounter Mod 2 = 0 Then
           If boo = True Then
               strCode = strCode + Chr(Asc(Mid(UCase(strPassword), intCounter, 1)) + 1)
           Else
               strCode = strCode + Chr(Asc(Mid(UCase(strPassword), intCounter, 1)) - 1)
           End If
       Else
           If boo = True Then
               strCode = strCode + Chr(Asc(Mid(UCase(strPassword), intCounter, 1)) + 2)
           Else
               strCode = strCode + Chr(Asc(Mid(UCase(strPassword), intCounter, 1)) - 2)
           End If
       End If
   Next intCounter

   PerformEncryption = strCode

End Function

MyString = PerformEncryption(MyString, True)

 

Hentet fra: Access World Forums

Lenke til kommentar

Opprett en konto eller logg inn for å kommentere

Du må være et medlem for å kunne skrive en kommentar

Opprett konto

Det er enkelt å melde seg inn for å starte en ny konto!

Start en konto

Logg inn

Har du allerede en konto? Logg inn her.

Logg inn nå
×
×
  • Opprett ny...