473,691 Members | 2,860 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to encrypt a Table

I have a table with 15.000 records.
How can encrypt all information if after will shown in a form (text
box)decryted ?????

Thanks in advance
Javier Gomez
Nov 13 '05 #1
10 9602
DFS
Javier Gomez wrote:
I have a table with 15.000 records.
How can encrypt all information if after will shown in a form (text
box)decryted ?????

Thanks in advance
Javier Gomez


Javier,

Do you really need encryption, or just some minimum form of security to make
it difficult for others to read?

You can:

1) use the built-in Access security processes to "secure" the database
2) use a file system level encryption program - this is unrelated to MS
Access
3) look for encryption components someone has written to work with Access
4) write your own custom routines to encrypt and store the data, and decrypt
and display it.

Here are a couple cheesy routines that will disguise the data, and
undisguise it:

Public Function encryptPW(pWord As String) As String

encryptPW = ""
For I = 1 To Len(pWord)
encryptPW = encryptPW & Chr(Asc(MID(UCa se(pWord), I, 1)) + 50)
Next I

End Function
Public Function decryptPW(pWord As String) As String

decryptPW = ""
For I = 1 To Len(pWord)
decryptPW = decryptPW & Chr(Asc(MID(pWo rd, I, 1)) - 50)
Next I

End Function


Nov 13 '05 #2
Thank You ! it is ok !
But only missing variable in the function
regards
Javier

"DFS" <no****@DFS.com > wrote in message news:<Yc******* **********@fe03 .lga>...
Javier Gomez wrote:
I have a table with 15.000 records.
How can encrypt all information if after will shown in a form (text
box)decryted ?????

Thanks in advance
Javier Gomez


Javier,

Do you really need encryption, or just some minimum form of security to make
it difficult for others to read?

You can:

1) use the built-in Access security processes to "secure" the database
2) use a file system level encryption program - this is unrelated to MS
Access
3) look for encryption components someone has written to work with Access
4) write your own custom routines to encrypt and store the data, and decrypt
and display it.

Here are a couple cheesy routines that will disguise the data, and
undisguise it:

Public Function encryptPW(pWord As String) As String

encryptPW = ""
For I = 1 To Len(pWord)
encryptPW = encryptPW & Chr(Asc(MID(UCa se(pWord), I, 1)) + 50)
Next I

End Function
Public Function decryptPW(pWord As String) As String

decryptPW = ""
For I = 1 To Len(pWord)
decryptPW = decryptPW & Chr(Asc(MID(pWo rd, I, 1)) - 50)
Next I

End Function

Nov 13 '05 #3
Only 1 more problem your decrypt function returns Uppercase letters.
Can you tell me how to resovel this problem ?

Thank you !
Javier Gomez
"DFS" <no****@DFS.com > wrote in message news:<Yc******* **********@fe03 .lga>...
Javier Gomez wrote:
I have a table with 15.000 records.
How can encrypt all information if after will shown in a form (text
box)decryted ?????

Thanks in advance
Javier Gomez


Javier,

Do you really need encryption, or just some minimum form of security to make
it difficult for others to read?

You can:

1) use the built-in Access security processes to "secure" the database
2) use a file system level encryption program - this is unrelated to MS
Access
3) look for encryption components someone has written to work with Access
4) write your own custom routines to encrypt and store the data, and decrypt
and display it.

Here are a couple cheesy routines that will disguise the data, and
undisguise it:

Public Function encryptPW(pWord As String) As String

encryptPW = ""
For I = 1 To Len(pWord)
encryptPW = encryptPW & Chr(Asc(MID(UCa se(pWord), I, 1)) + 50)
Next I

End Function
Public Function decryptPW(pWord As String) As String

decryptPW = ""
For I = 1 To Len(pWord)
decryptPW = decryptPW & Chr(Asc(MID(pWo rd, I, 1)) - 50)
Next I

End Function

Nov 13 '05 #4
Javier Gomez wrote:
Only 1 more problem your decrypt function returns Uppercase letters.
Can you tell me how to resovel this problem ?

Thank you !
Javier Gomez
"DFS" <no****@DFS.com > wrote in message news:<Yc******* **********@fe03 .lga>...
Javier Gomez wrote:
I have a table with 15.000 records.
How can encrypt all information if after will shown in a form (text
box)decryt ed ?????

Thanks in advance
Javier Gomez


Javier,

Do you really need encryption, or just some minimum form of security to make
it difficult for others to read?

You can:

1) use the built-in Access security processes to "secure" the database
2) use a file system level encryption program - this is unrelated to MS
Access
3) look for encryption components someone has written to work with Access
4) write your own custom routines to encrypt and store the data, and decrypt
and display it.

Here are a couple cheesy routines that will disguise the data, and
undisguise it:

Public Function encryptPW(pWord As String) As String

encryptPW = ""
For I = 1 To Len(pWord)
encryptPW = encryptPW & Chr(Asc(MID(UCa se(pWord), I, 1)) + 50)
Next I

End Function
Public Function decryptPW(pWord As String) As String

decryptPW = ""
For I = 1 To Len(pWord)
decryptPW = decryptPW & Chr(Asc(MID(pWo rd, I, 1)) - 50)
Next I

End Function


Get rid of the ucase in the Encrypt function.
--
This sig left intentionally blank
Nov 13 '05 #5
Sorry but not understand !
Example:
(before encrypt)= Trevor Best
(Encryp)=xxxx
(after encryp)= TREVOR BEST
And I need after encrypt to get Trevor Best !

Can you please write the full code (considering uppercase words)?

Javier

Trevor Best <no****@besty.o rg.uk> wrote in message news:<42******* *************** @news.zen.co.uk >...
Javier Gomez wrote:
Only 1 more problem your decrypt function returns Uppercase letters.
Can you tell me how to resovel this problem ?

Thank you !
Javier Gomez
"DFS" <no****@DFS.com > wrote in message news:<Yc******* **********@fe03 .lga>...
Javier Gomez wrote:

I have a table with 15.000 records.
How can encrypt all information if after will shown in a form (text
box)decryt ed ?????

Thanks in advance
Javier Gomez

Javier,

Do you really need encryption, or just some minimum form of security to make
it difficult for others to read?

You can:

1) use the built-in Access security processes to "secure" the database
2) use a file system level encryption program - this is unrelated to MS
Access
3) look for encryption components someone has written to work with Access
4) write your own custom routines to encrypt and store the data, and decrypt
and display it.

Here are a couple cheesy routines that will disguise the data, and
undisguise it:

Public Function encryptPW(pWord As String) As String

encryptPW = ""
For I = 1 To Len(pWord)
encryptPW = encryptPW & Chr(Asc(MID(UCa se(pWord), I, 1)) + 50)
Next I

End Function
Public Function decryptPW(pWord As String) As String

decryptPW = ""
For I = 1 To Len(pWord)
decryptPW = decryptPW & Chr(Asc(MID(pWo rd, I, 1)) - 50)
Next I

End Function


Get rid of the ucase in the Encrypt function.

Nov 13 '05 #6
Bri
As advised, get rid of the UCase in the Encrypt function.

Line:
encryptPW = encryptPW & Chr(Asc(MID(UCa se(pWord), I, 1)) + 50)

Becomes:
encryptPW = encryptPW & Chr(Asc(MID(pWo rd, I, 1)) + 50)

--
Bri

Javier Gomez wrote:
Sorry but not understand !
Example:
(before encrypt)= Trevor Best
(Encryp)=xxxx
(after encryp)= TREVOR BEST
And I need after encrypt to get Trevor Best !

Can you please write the full code (considering uppercase words)?

Javier


Original Function:
Public Function encryptPW(pWord As String) As String
encryptPW = ""
For I = 1 To Len(pWord)
encryptPW = encryptPW & Chr(Asc(MID(UCa se(pWord), I, 1)) + 50)
Next I
End Function
Nov 13 '05 #7
Thank you !
This problem is now arranged, but when I try to use this function in a
Query for Example 8.000 records the function starts making some debugs
problems I need to Cancel function sereval times until Access let me
quit from the Query.
What can I do ?

Regards
Javier Gomez
Bri <no*@here.com > wrote in message news:<62%Xd.633 803$6l.613535@p d7tw2no>...
As advised, get rid of the UCase in the Encrypt function.

Line:
encryptPW = encryptPW & Chr(Asc(MID(UCa se(pWord), I, 1)) + 50)

Becomes:
encryptPW = encryptPW & Chr(Asc(MID(pWo rd, I, 1)) + 50)

--
Bri

Javier Gomez wrote:
Sorry but not understand !
Example:
(before encrypt)= Trevor Best
(Encryp)=xxxx
(after encryp)= TREVOR BEST
And I need after encrypt to get Trevor Best !

Can you please write the full code (considering uppercase words)?

Javier


Original Function:
Public Function encryptPW(pWord As String) As String
encryptPW = ""
For I = 1 To Len(pWord)
encryptPW = encryptPW & Chr(Asc(MID(UCa se(pWord), I, 1)) + 50)
Next I
End Function

Nov 13 '05 #8
Bri
Javier,

This wasn't my function, I was just pointing out how to use the advice
you were given in the other message.

As to your new problem, you will get more help if you tell us what error
number/message you are getting, what line it is happening on and what
the input is that you are trying to send to the function.

If I had to guess, I would say that you are sending a character that is
in the ASC value of 206 or more (because then adding 50 creates a new
character that is not a valid character since the max value is 255).
Since it seems that your native language is not english, it could be one
of the special accented letters. The way around this would be to test if
the ASC value +50 is greater than 206 and then subtract 206 from it
before you create the new character. You will need to do the reverse
test (ie check for value <50 and then add 206) on the decrypt function.

--
Bri

Javier Gomez wrote:
Thank you !
This problem is now arranged, but when I try to use this function in a
Query for Example 8.000 records the function starts making some debugs
problems I need to Cancel function sereval times until Access let me
quit from the Query.
What can I do ?

Regards
Javier Gomez
Bri <no*@here.com > wrote in message news:<62%Xd.633 803$6l.613535@p d7tw2no>...
As advised, get rid of the UCase in the Encrypt function.

Line:
encryptPW = encryptPW & Chr(Asc(MID(UCa se(pWord), I, 1)) + 50)

Becomes:
encryptPW = encryptPW & Chr(Asc(MID(pWo rd, I, 1)) + 50)

--
Bri

Javier Gomez wrote:
Sorry but not understand !
Example:
(before encrypt)= Trevor Best
(Encryp)=xxx x
(after encryp)= TREVOR BEST
And I need after encrypt to get Trevor Best !

Can you please write the full code (considering uppercase words)?

Javier


Original Function:
Public Function encryptPW(pWord As String) As String
encryptPW = ""
For I = 1 To Len(pWord)
encryptPW = encryptPW & Chr(Asc(MID(UCa se(pWord), I, 1)) + 50)
Next I
End Function

Nov 13 '05 #9
DFS
Bri wrote:
Javier,

This wasn't my function, I was just pointing out how to use the advice
you were given in the other message.

As to your new problem, you will get more help if you tell us what
error number/message you are getting, what line it is happening on
and what the input is that you are trying to send to the function.

If I had to guess, I would say that you are sending a character that
is in the ASC value of 206 or more (because then adding 50 creates a
new character that is not a valid character since the max value is
255). Since it seems that your native language is not english, it
could be one of the special accented letters.
Yes.

The way around this
would be to test if the ASC value +50 is greater than 206 and then
subtract 206 from it before you create the new character. You will
need to do the reverse test (ie check for value <50 and then add 206)
on the decrypt function.

And Javier, you should recognize I chose 50 arbitrarily. Any ASCII shift,
plus or minus, will [weakly] disguise your data. Remember, it can easily be
decrypted by any curious user who can find an ASCII table on the Web.

If you want to make your data really hard to read or decipher outside your
app, there are lots of tricks you can play with classic forms of encryption,
including letter substitution and transposition, and using a keyword and
routines hard-coded inside an .mde. These types of encryption generally
require very experienced cryptanalysts or computer analysis to decipher.

This webpage will give you a brief introduction to classic cryptography
http://library.thinkquest.org/27158/concept.html

There's a really interesting encryption method invented by the Germans in
World War 1. It's called ADFGVX, which are the only six letters used in the
ciphertext (the encrypted data). I wrote a VB program [for myself] that
used ADFGVX to encrypt/decrypt short paragraphs, and it ran quickly, but I
can't vouch for the speed if you tried to use it in an Access/VBA system.

Javier Gomez wrote:
Thank you !
This problem is now arranged, but when I try to use this function in
a
Query for Example 8.000 records the function starts making some
debugs problems I need to Cancel function sereval times until Access
let me
quit from the Query.
What can I do ?

Regards
Javier Gomez
Bri <no*@here.com > wrote in message
news:<62%Xd.633 803$6l.613535@p d7tw2no>...
As advised, get rid of the UCase in the Encrypt function.

Line:
encryptPW = encryptPW & Chr(Asc(MID(UCa se(pWord), I, 1)) + 50)

Becomes:
encryptPW = encryptPW & Chr(Asc(MID(pWo rd, I, 1)) + 50)

--
Bri

Javier Gomez wrote:

Sorry but not understand !
Example:
(before encrypt)= Trevor Best
(Encryp)=xxxx
(after encryp)= TREVOR BEST
And I need after encrypt to get Trevor Best !

Can you please write the full code (considering uppercase words)?

Javier
Original Function:
Public Function encryptPW(pWord As String) As String
encryptPW = ""
For I = 1 To Len(pWord)
encryptPW = encryptPW & Chr(Asc(MID(UCa se(pWord), I, 1)) + 50)
Next I
End Function

Nov 13 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7950
by: wqhdebian | last post by:
As far as I know,when encrypt or decrypt ,a key must first be got,and the key is first generate by a tool or from SecurityRandom,that means I can not generate the same key with the same input.Does there is a method which can generate a same with the same input string? There is a need to transfer file between to site,and the customer wish to encrypt these files during transfering,and they want to store a string into each database at...
3
3259
by: Russ Reynolds | last post by:
SQL Server 2000: ######################################################## I run the following as a normal query from Analyzer: ######################################################## SELECT encrypt(user_password) FROM emp WHERE user_id = 1 ######################################################### I run the following query from inside a stored proc:
3
1721
by: JellyON | last post by:
Do you know about an encryption script which accepts the accentued characters. I've found the one below (from WebExpert premade scripts), but when you encrypt "assurément", then reverse the process, you retrieve "assurment" : the "é" is gone ! Here is this script (maybe you have another) in an HTML page (simply copy/paste to see the result) : <html> <head>
20
4164
by: Drebin | last post by:
It's a long story really, but the bottom line is we need to encrypt or obfuscate a clear-text 9-digit SSN/taxpayer ID into something less than 21 characters. It doesn't need to be super-secure, just something that isn't plain-text and it HAS to be as unique as the original number. It also does not need to be a symmetric algorithm - we are using this as a way to create a unique "userid" on a system to which we single-signon. So it's used...
1
2269
by: Tommy | last post by:
I want to encrypt the values of my cookies. I found out that I could create a FormsAuthenticationTicket, and use the FormsAuthentication.Encrypt method to encrypt the cookie. However, I do not want to use FormsAuthentication feature. I already have custom code to redirect the use back to the login page if they haven't signed on. My question is can I use the FormsAuthentication.Encrypt method to encrypt my cookies without using the...
3
2461
by: Alex Nitulescu | last post by:
Hi. I am writing an app which stores usernames/passwords and email addresses in a database table. The question is how can I encrypt the password provided by the user ? FormsAuthentication.Encrypt produces an encrypted string, but it is for use in a ticket. On the other hand, FormsAuthentication.HashPasswordForStoringInConfigFile produces an encrypted string for use in a config.xml file.
8
6315
by: Declan Barry | last post by:
Hi all.. Does anyone have a php script that would allow me to encrypt the contents of a txt file? I have an excel file which has a list of usernames and generated passwords. What I would like to do is copy out the plaintext passwords to a txt file and then do a conversion to encrypt the passwords using MD5 encryption as they will then be imported into a MySQL database.
3
7697
by: rcamarda | last post by:
Hello, While working through my encryption questions from preivous posts, I am finding that I may have to resort to use triggers to do the encryption (not that this is the only way, but might be the best way for my circumstances). I would like to create a trigger that will encrypt the field before the write is committed. I've found serveral posts about triggers, but nothing that fits what I wish to do. Upon an insert or update I want to...
2
3176
by: fineman | last post by:
Hi all, I want to get a 64bit(8 bytes) Encrypt result use DES class in the VS2005. Though I encrypt data is 64bit(8 bytes), but DES return encrypt result that always is 128bit(16 bytes), I don't know why? How to get a 64bit(8 bytes) encrypt result using DES class in the VS2005?
0
8531
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9079
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8791
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8794
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6457
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5813
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4322
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
1952
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.