in this video we'll talk about how you
can use the utility function
a5 encrypt table field to encrypt or
decrypt uh
existing data in a sql table so you can
see
over here we have a sql table that has
data in a field called name and a data
in a field called credit card number and
currently the credit card number field
is not encrypted so let's say we'd like
to
encrypt this data so i'm going to go
here and
call the uh encrypt function over here
so this function a5 encrypt table field
takes
a connection string a table name a field
name
uh the encryption key over here with
i've got this prefix added here
because i want the encrypted values to
be stored with the prefix
and then finally a mode which can either
be encrypt or decrypt
so my connection string that points to
my sequel
table to this table is called
mariah underbar test my table name is
credit card
is credit cards and the field that i'd
like to encrypt is the credit card
number field
and the key that i'd like to use is
alpha so i'm going to go ahead now
and run this and now if i go to the
table
and look at it i can see that all the
credit card numbers have been encrypted
now
with this prefix called encrypted and
but if i go and look at the same data
in my list control
i can see that even though the date the
data into that in the underlying table
is encrypted
the list shows the unencrypted values
and now i can also go back to
my utility functions and now run the
decrypt function
so having decrypted it now if i go and
look at the sql table
i'll see that all the data has been
unencrypted
so the a5 encrypt table field
function is a utility function that can
be used
on tables with existing data
to encrypt the data
in the inner field in all of the encrypt
the existing records thanks very much
for watching
Customer Support