| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 722 人关注过本帖
标题:C#加密类问题
只看楼主 加入收藏
nj_first
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2007-8-20
收藏
 问题点数:0 回复次数:2 
C#加密类问题
在我的测试程序中已经引入System.Security.Cryptography命名空间,但还是出现这个错误
找不到类型或命名空间名称“PasswordDeriveBytes”(是否缺少 using 指令或程序集引用?) D:\Visual Studio 2005\Projects\ConsoleApplication2\ConsoleApplication2\RijndaelSimple.cs 71 13 ConsoleApplication2
搜索更多相关主题的帖子: 空间名称 加密 命名 
2007-08-20 11:02
hxhfg
Rank: 1
等 级:新手上路
帖 子:284
专家分:0
注 册:2006-4-18
收藏
得分:0 

2007-08-21 03:10
nj_first
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2007-8-20
收藏
得分:0 
未处理 System.Security.Cryptography.CryptographicException
Message="要解密的数据的长度无效。"
Source="mscorlib"
StackTrace:
在 System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
在 System.Security.Cryptography.CryptoStream.Read(Byte[] buffer, Int32 offset, Int32 count)
在 TestApp.RijndaelEnhanced.DecryptToBytes(Byte[] cipherTextBytes) 位置 D:\Visual Studio 2005\Projects\TestApp\RijndaelEnhanced.cs:行号 650
在 TestApp.RijndaelEnhanced.Decrypt(Byte[] cipherTextBytes) 位置 D:\Visual Studio 2005\Projects\TestApp\RijndaelEnhanced.cs:行号 597
在 TestApp.HttpVisit.DecryptText(Byte[] data, Byte[] key, Byte[] salt) 位置 D:\Visual Studio 2005\Projects\TestApp\HttpVisit.cs:行号 161
在 TestApp.HttpVisit.requestVisit() 位置 D:\Visual Studio 2005\Projects\TestApp\HttpVisit.cs:行号 103
在 TestApp.Form1.loginButton_Click(Object sender, EventArgs e) 位置 D:\Visual Studio 2005\Projects\TestApp\Form1.cs:行号 25
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
在 System.Windows.Forms.Button.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.Run(Form mainForm)
在 TestApp.Program.Main() 位置 D:\Visual Studio 2005\Projects\TestApp\Program.cs:行号 17
在 System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
在 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart()
2007-09-04 14:53
快速回复:C#加密类问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.024273 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved