Simply:
Public Function fnEncrypedValue(ByVal value)
Dim sSourceData As String = value
Dim tmpSource As Byte() = ASCIIEncoding.ASCII.GetBytes(sSourceData)
Dim tmpHash As Byte() = New SHA1CryptoServiceProvider().ComputeHash(tmpSource)
tmpHash = ByteArrayToString(tmpHash)
Return tmpHash
End Function
GetBytes()
and
ComputeHash()
methods return a byte array; you have to take that in account in your variables declarations.