Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3214998
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:07:35+00:00 2026-05-17T15:07:35+00:00

I am trying to translate some existing C++ code to C#. I have some

  • 0

I am trying to translate some existing C++ code to C#. I have some code which calls CryptHashData 3 times on the same HCRYPTHASH. The documentation says “This function and CryptHashSessionKey can be called multiple times to compute the hash of long or discontinuous data streams.”

Which is what I want to achieve in C#. Unfortunately, MD5.ComputeHash() doesn’t appear to have a way to build on the existing hash.

Am I missing something, is there a C# API that would achieve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:07:35+00:00Added an answer on May 17, 2026 at 3:07 pm

    Instantiate an instance of the hash class and use TransformBlock and TransformFinalBlock:

    byte[] part1 = //...
    byte[] part2 = //...
    byte[] part3 = //...
    var hash = new MD5CryptoServiceProvider();
    hash.TransformBlock(part1, 0, part1.Length, null, 0);
    hash.TransformBlock(part2, 0, part2.Length, null, 0);
    hash.TransformFinalBlock(part3, 0, part3.Length);
    byte[] res = hash.Hash;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some simple example WinForms code which I am trying to translate into
I have some Python code I'm trying to translate to Obj-C/Cocoa. It requires a
I'm trying to translate some C# LINQ code into VB.NET and am stuck on
for some reasons I am trying to translate the following RoR view code to
I'm trying to translate some python code to haskell. However I reached a point
I'm trying to translate some C++ code for a neural net into C#. I
I have some C# code that looks like this: uint a = 0x9E3779B9; a
Trying to translate some methods written in Python over into C#. The line looks
I am a C# guy trying to translate some of my OOP understanding over
As a way to get used to python, I am trying to translate some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.