VB.NET 函数 转 JAVA 函数
下面的函数是用VB.net写的一段函数,能正常运行,有高手能将其转换成java代码吗?Function gStr(ByVal strSource As String) As String
Dim bytestr As Byte() = (New System.Text.ASCIIEncoding).GetBytes(strSource)
Dim bytestrv As Byte() = CType(System.Security.Cryptography.CryptoConfig.CreateFromName("MD5"), System.Security.Cryptography.HashAlgorithm).ComputeHash(bytestr)
Dim str As String = ""
Dim i As Integer
For i = 0 To 15
str &= Hex(bytestrv(i)).ToLower
Next
Return str
End Function
补充:Java , Java SE