Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to call VFP function from .NET C# code?
Message
 
 
To
07/04/2015 03:22:54
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01612997
Message ID:
01617920
Views:
67
>The very first thing to do is to understand how character encoding works ( ascii, ansi ( single byte and double byte code pages), unicode ( utf8, utf16 LE, utf16 BE, utf32 LE, utf32 BE) )
>Second thing is that a char is a sequence of one or more bytes - depending on the encoding
>Text ( aka a sequence of chars) is always encoded using an encoding scheme
>
>Third thing to understand is that encryption works on bytes, not on chars
>
>If you need it to be vfp compatible - make sure to use a common character encoding ( ie so that any char maps to the same sequence of bytes)
>
>Then why not use AES or Rijndael
>In .net there are classes for those
>In vfp (1) Use craig Boyd's encryption, or (2) API's for AES, or (3) write your own in vfp code
>
>
>For (2) AES API use (ECB or CBC, PKCS7 padding, key, IV)
>For (1) and (3) use (ECB or CBC, PKCS7 or ANSIX923 or ISO10126 padding, key, IV)

In our current VFP code we were using cipher.fll encryption. That's why when I saw this thread I thought I just grab that code (my colleague actually asked me to). He tested it and found a problem. I think our latest idea is to not try to duplicate VFP code but rather use a different encryption scheme.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform