Solved

VB.Net to VB6 Conversion

Posted on 2013-01-05
2
420 Views
Last Modified: 2013-01-05
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
Comment
Question by:Soumen-Roy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 38747341
I think it would be easier to create a component (.dll) in .Net with this code and use it from VB6.
0
 

Author Closing Comment

by:Soumen-Roy
ID: 38748019
Thanx
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
asp.net figure out error 3 47
How do i create a simple array in a public class? 6 36
vb.net code 9 28
unable to isntall .net framework 3.5 19 36
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question