• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 427
  • Last Modified:

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
0
Soumen-Roy
Asked:
Soumen-Roy
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
I think it would be easier to create a component (.dll) in .Net with this code and use it from VB6.
0
 
Soumen-RoyAuthor Commented:
Thanx
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now