use*_*946 2 .net c# windows-mobile
我正在使用Microsoft Visual Studio 2008编写移动应用程序,需要加密文件.我试图使用一种File.Encrypt方法,但它导致以下错误:
错误CS0117:'System.IO.File'不包含'Encrypt'的定义.
我该如何应对这个问题?
它无法工作的原因是因为File.Encrypt实际上调用了本机Win32函数EncryptFile(LPSTR path),该函数不会出现在移动设备上.
我作为替代方案的建议是使用System.Security.Cryptography命名空间中存在的加密算法.