Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 428
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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