when i run the following code, the above error is occured. can anybody
help me? sorry cosz it is a vb.net code.
Public Function Decrypt(ByVal strToDecrypt As String) As String
Dim sb As New StringBuilder
Dim byteToDecrypt() As Byte = Convert.FromBas e64String(strTo Decrypt)
Dim byteDecoded(byt eToDecrypt.Leng th) As Byte
Dim ms As New MemoryStream(by teToDecrypt)
Dim cs As CryptoStream
Try
byteKey = GetKey(strKey)
byteIV = GetKey(strIV)
Dim desProvider As New DESCryptoServic eProvider
cs = New CryptoStream(ms , desProvider.Cre ateDecryptor(by teKey,
byteIV), CryptoStreamMod e.Read)
cs.Read(byteDec oded, 0, byteDecoded.Len gth)
cs.FlushFinalBl ock()
Catch ex As Exception
Throw New Exception(ex.Me ssage)
Finally
ms.Close()
cs.Close()
End Try
Dim intLength As Integer = byteDecoded.Len gth - 1
For i As Integer = 0 To intLength
sb.Append(byteD ecoded(i).ToStr ing)
Next
Return sb.ToString
End Function
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!