>>>I opened a text doc with Notepad, entered the above characters (using Alt-197 and so on). But when I try to save the text file, I get message that the characters in Unicode format will be lost. I believe the this function that Viv translated from VFP has to work on plain text. So maybe your colleague is right. How do you create a plain text document with the characters as above?
>>
>>This is what my colleague told me:
>>
>>Try encrypting a string in VFP using the Cipher50.fll with a key that is Chr(191) + chr(130) + chr(189) + chr(150)
>>You'll find that the C# result is not a match for the VFP result.
>>
>>If you encrypt with regular low ascii, it works beautifully, though. Unfortunately, the way we encrypt the license files takes the client number, and encrypts it - then uses that result to encrypt the file. The chr() vaues I gave you above are the results of encrypting the client number 8151.
>>
>>Do you or Viv know what needs to be adjusted in that code to be able to work with high ascii chars as well?
>
>I don't use Cipher50.fll to encrypt the string in VFP. I use a function created by Sergey B. So maybe this is why your colleague is not getting the results he/you want.
It's possible that Sergey's function didn't work with high ascii values either. Can you just test it with high ascii values?
If it's not broken, fix it until it is.
My Blog