ASP.NET此实现不是Windows平台FIPS验证的加密算法的一部分



嘿,当尝试使用我的asp.net页面比较数据库中的密码时,我会遇到此错误。

此实现不是Windows平台FIPS验证的加密算法的一部分。

代码看起来像这样:

Public Shared Function UserAuthentication(ByVal user As String, ByVal pass As String) As WebUserSession
  Dim strSQL As String = ""
  Dim strForEncryption As String = pass
  Dim result As Byte()
  Dim sHA1Managed As SHA1 = New SHA1Managed()
  Dim encryptedString As New System.Text.StringBuilder()
  result = sHA1Managed.ComputeHash(ASCIIEncoding.ASCII.GetBytes(pass))
  For Each outputByte As Byte In result
    'convert each byte to a Hexadecimal upper case string
    encryptedString.Append(outputByte.ToString("x2").ToUpper())
  Next
  strSQL &= "SELECT email, name, id, permission_id, username FROM (user) INNER JOIN user_per ON user.id = user_per.user_id "
  strSQL &= "WHERE(username = '" & user & "' And password = '" & encryptedString.ToString() & "')"

我们最近必须更新/锁定服务器以符合安全孔等。但是这样做会导致我们在同一家服务器上托管的网站之一引起此错误。在所有这些安全设置之前,网站工作正常。

奇怪的部分是我能够在VS 2010中运行网站本地(调试模式),而且确实可以。根本没有错误。

有人会有任何建议如何解决此问题以使网站再次工作,就像我们添加所有这些安全设置要投诉之前一样?我们根本无法将其禁用,因为这会导致我们的其他网站不合规。

我已经尝试了这些页面上的建议:http://blogs.msdn.com/b/brijs/archive/2010/08/10/10/issue-getting-this-implementation-is-inot-is-not-part-of-the-windows-windows-platorm-platform-fips-validatecrated-crypography-cryperpographi算法 - 外观 - 构建户外look-vsto-add-in-in-in-in-in-vs-2010.aspx

http://social.msdn.microsoft.com/forums/en/clr/thread/7a62c936-b3cc-4493-a3cd-cc5fd18b6b2a

http://support.microsoft.com/kb/935434

http://blogs.iis.net/webtopics/archive/2009/07/20/parser-error-eror-message-message-this-implementation-implementation-is-is-not-not-part-part-part-part-----------------im implement-the-windows-platform-platform-fips-fips-fips-validated-validated-validated-Cryptography-Algorithms-当网状页面has-debug-true.aspx

http://blog.aggregatedintelligence.com/2007/10/fips-validated-cryptography-algorithms.html

谢谢。

尝试使用此代码以及

Dim p As String = Password.Text.ToString
Dim data(p) As Byte
Dim result() As Byte
Dim sha As New SHA1CryptoServiceProvider()
result = sha.ComputeHash(data)

错误是:

从字符串" S51998DG5"转换为type'Integer'是无效的。

,该错误在线上: dim Data(p)为字节

根据此sha1的管理不符合FIPS。它引发了无效的exception,因为此类不符合FIPS算法。

您需要分解FIPS合规性或使用符合FIPS的实现。我认为sha1cryptoserviceprovice是FIPS投诉。

最新更新