Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Encrypting a field in SQL Server
Message
De
18/01/2019 07:25:32
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Encrypting a field in SQL Server
Divers
Thread ID:
01665536
Message ID:
01665536
Vues:
63
Hi,

This description is somewhat simplified but close enough for this question.

In my app, password module, there is a table on SQL Server, UserGroup. This table has a field ACCESS_CODE Char(250). The entry in this field looks something like this:
"YNNNYYYYNNN"
that is the entry in this field consists of "Y" and "N". The application "knows" that a position (for example) 100 in this field specifies if the user has access to feature X. That is, if position 100 has entry "N", a user will not be allowed access to feature X.

Right now, the entire table and the field are not encrypted. It has not been a problem since my customers are very low-tech and never connect to SQL Server to check these things.

But it bothers me. So, I would like to encrypt this field. But in such way, that from the VFP application I can manipulate the entries (e.g. Change "Y" to "N" or the other way around).

I am considering using the cipher() function created by Sergey Berezniker. I use this function in other places in my app, for encryption. My only "problem" with cipher() is that the app has to be absolutely sure when it encrypts and when it decrypts a string. That is, if the function is applied to a encrypted string attempting to encrypt it, a problem entry occurs.

Does SQL Server offer a better way to encrypt such a field with ability to change the entry from the VFP 9 app?

TIA
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform