Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Encrypted dbf file.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00808797
Message ID:
00808798
Vues:
25
Hi Brad,

Assuming that every field was encrypted separately and all fields are character type and encrypted
constdebug = 0
SELECT 0
USE mytable
SCAN
  FOR i=1 TO FCOUNT()
    lcVakue = EVAL( FILED(i))
    REPLACE ( FILED(i)) WITH decrypt(lcVakue)
  ENDFOR
ENDSCAN
>A friend sent me this tid bit of code and a encrypted .dbf file.
>I am not sure on how to decrypt it for him. Below is the code that he sent me. Can any help me write a decrypt for it?
>
>TKS
>
<snip>>*
>FUNCTION decrypt
>PARAMETER databuffer
>IF constdebug > 0
>     RETURN databuffer
>ENDIF
>szindata = databuffer
>szoutdata = ""
>ncharpos = 0
>IF  .NOT.  ;
>    EMPTY(ALLTRIM(szindata))
>     keystring = 'In the end there shall be only one, SKANKER'
>     newchar = ''
>     nkeyindex = 1
>     FOR ncharpos = 1 TO  ;
>         LEN(szindata)
>          IF nkeyindex >  ;
>             LEN(keystring)
>               nkeyindex = 1
>          ENDIF
>          newchar = CHR(ASC(SUBSTR(szindata,  ;
>                    ncharpos, 1)) -  ;
>                    ASC(SUBSTR(keystring,  ;
>                    nkeyindex,  ;
>                    1)))
>          szoutdata = szoutdata +  ;
>                      newchar
>          nkeyindex = nkeyindex +  ;
>                      1
>     ENDFOR
>ENDIF
>szoutdata = ALLTRIM(szoutdata)
>RETURN szoutdata
>ENDFUNC
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform