Suggestion please- Scramble characters (1 Viewer)

MCantu

Registered User.
Local time
Yesterday, 23:28
Joined
Nov 18, 2004
Messages
62
I am building a database with business contacts.
Most of these contacts are shared with everyone.
However, trying to centralize data, I am going to have personal contacts be placed in the database too.

The personal contact is someone the employee goes to for help. When they find someone at a business that is helpful, they want to return to that person.

Some of the users are protective of their personal contacts.
When the user adds a new personal contact, I want to give them the option of scrambling the information so another user can't just easily pick it up.

This is not a major security issue, just something to make the user feel better that their personal contact is not wide open for everyone to see- (and someone else use on the sly without the original owner knowing)
I don't want to mess with security, because other then this- the database is rather free to access information.

My first thought was to scramble the ASCII Characters. This seems to me to be the simplest method.

Has anyone ever had the need to do this- and what is the simplest method?

Like I said- security is not really an issue, this is just to make the user feel better.

I was thinking, have them enter a password, I use the ASCII value of the letters to do…something.

Suggestions?
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 07:28
Joined
Sep 12, 2006
Messages
15,727
'heres one idea

xor every char in the string with 255 (or any other number)
it will look really strange but xor is very useful as it is reversible by repeating the process

Code:
Function encryptpass(pass As String) As String

'xor each character with 255
Dim x As Integer
Dim letter As String
Dim byt As Byte

For x = 1 To Len(pass)
    letter = Mid(pass, x, 1)
    byt = Asc(letter) Xor 255
    letter = chr$(byt)
    
    pass = Mid(pass, 1, x - 1) & letter & Mid(pass, x + 1, Len(pass))
Next x
encryptpass = pass

End Function
 

MCantu

Registered User.
Local time
Yesterday, 23:28
Joined
Nov 18, 2004
Messages
62
Yea

Something along these lines sounds good.

I wanted to keep it simple.
Nothing fancy.
I was concidering having them enter a 3 letter code- and then use the character number of the 1st to shift all character codes down.
(forinstance a A is a 65- so everything shifted by 65, and then the next character shifted it again, and the next character shifted AGAIN.... but I dont' want to keep track of thier codes used to scramble it... and I KNOW they will forget it)


I don't care what the scambled product is, as long as it's not obvious.

I am going to keep this simple.

THANKS~!!!!!!
 

Users who are viewing this thread

Top Bottom