Link to home
Create AccountLog in
Avatar of Soumen-Roy
Soumen-RoyFlag for India

asked on

VB.Net to VB6 Conversion

Hi Experts,

Can anyone convert the following code to VB6?  

Private Function SHA256File(ByVal input As String) As String
        Dim rdr As FileStream
        Dim sha As New SHA256Managed
        Dim bytes() As Byte
        Dim output As String = ""
        If File.Exists(input) Then
            rdr = New FileStream(input, FileMode.Open, FileAccess.Read)
            bytes = sha.ComputeHash(rdr)
            For Each b As Byte In bytes
                output += b.ToString("x2")
            Next
        End If
        Return output
    End Function

Thanking you,
Soumen
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Soumen-Roy

ASKER

Thanx