Encryption code

And encrytion algo that will work on Korean windows and normal english windows.  this means that one should be able to encrypt a string with the range of 1 t 127 and decrypt the same.
AkhilAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

VbmasterCommented:
Go to www.planetsourcecode.com and search for encrypt or decrypt, you'll find a lot of sample codes for different encryption/decryption algorithms.
0
PerBomanCommented:
This is a very simple coding/uncoding
function.

I you call it twice you will have the
string uncoded again.

It's simple replace any char 'x' whit
a char 'y'.
So it's not a hard crypting-algo but easy to implement.

Private Function XorCoding(ByVal oldS As String) As String
   
    Const codeSign = "7" 'could be any character
    Dim newS As String
    Dim char As String
    Dim i As Integer
   
    newS = oldS
   
    For i = 1 To Len(oldS)
        char = Mid(oldS, i, 1)
        Mid(newS, i, 1) = Chr(Asc(char) Xor Asc(codeSign))
    Next i
    XorCoding = newS
   
End Function
0
cvidlerCommented:
I got a VB implementation of RC4 (from the makers of RSA http://www.rsa.com/ ) if you want it - just reply to this and I'll sedn the source - in an easy to use Class module...
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

cvidlerCommented:
Forgot to mention - RC4 will encrypt (very strong too upto 2048 bits) all 256 ASCII/ANSI characters and is blazingly fast upto 1.3Mb/s on a 300Mhz processor! Thats the fastest encryption I've seen done in VB (if you wish to prove me wrong - you can send me your code!)

It appears RC4 will be perfect for you're needs...

PS. You can't get VB source from RSA - I had to convert it from C myself.
0
VbmasterCommented:
cvidler: is it any different from the 4 implementations you can find at www.planetsourcecode.com?
0
AkhilAuthor Commented:
cvidler:  YOu can mail me the source code.  I already have a Rc4 implentation but i need to customize it so that it will work on a DBCS(Double byte char set) evironmetn.  
0
davidreabowCommented:
cvidler:   Please could you mail me the source to RC4 encryption as well as the LZW Compression/Decompression.

Thanks
(davidreabow@hotmail.com)






0
Beginner2104Commented:
Perhaps you could take a look on the article on www.vb-online.com about encrypting using several charactersets.
0
Beginner2104Commented:
Uops! It is called www.vbonline.com
Feature article: Visual Basic and Encryption (by Chuck Easttom)
0
cvidlerCommented:
No - my code is entierly different from that at PSC - it actually works to the RSA RC4 standard - unlike the ones at PSC.

I didn't design it to work with UniCode (DBCS) but a simple conversion at either end (before encryption and after decryption will be all that is needed).

I'll fire up my e-mail prog and start firing off the code to you all...

:)
0
cvidlerCommented:
Ahkil - I'll need you're e-mail address...
0
AkhilAuthor Commented:
Sorry guys i was not well therefor unable to corrospond.  My email address is maddogmehra@yahoo.com
0
dreamvbCommented:
This should work fine

Function EncodeDecode(S As String, Password As String)
 J = Len(Password)
 For I = 1 To Len(S)
 letter = Mid(S, I, 1)
 Mid(S, I, 1) = Chr(Asc(letter) Xor Hex(J))
 Next
 Encode = S
 
End Function


Private Sub Command1_Click()
Text1.Text = Encode(Text1.Text, "Password")

End Sub
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.