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

  • SEARCH
  • Home
  • 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 7700203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:39:15+00:00 2026-05-31T22:39:15+00:00

Yes, its old and broken, but I’m trying to understand how MD2 works so

  • 0

Yes, its old and broken, but I’m trying to understand how MD2 works so I am trying to code it in C#. So far I have gotten to the padding which looks like it should be simple, but I’m unsure as to how it works exactly. https://www.rfc-editor.org/rfc/rfc1319 gives a good explanation, but the example in c is hard to understand where the padding is coming from. I’m confused as to why in the example code the numbering stops at 7 and then goes on to 10 almost as if its going from 0 to 7 for two 4-bit chunks.

I wrote this in an attempt to duplicate it, does this return the padding the way it is supposed to work?

public static byte[] getPadding(int number_needed)
        {
            byte[] temp = new byte[number_needed];
            for (int i = 0; i < temp.Count(); i++)
            {
                temp[i] = BitConverter.GetBytes(number_needed)[0];
            }
            return temp;
        }
  • 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-31T22:39:16+00:00Added an answer on May 31, 2026 at 10:39 pm

    As I understand that RFC, all padding bytes have the value of the number of padding bytes total. So if you need to add 5 padding bytes, you add 5 bytes of value 0x05.

    They must be using the octal notation in the code example – that goes from 01-07, then (octal)10, 11, 12…16, 17, 20. The decimal values still are 01-16, though (padding is never 0 bytes).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code (Yes I know it's quite long winded, but I
Delphi 1 16-bit (yeah it's old, but it works well) Some sample code: procedure
Yes, this is an old topic, but I still have some confusions. In Java,
yes its a joomla question and im sorry to annoy but asking on the
I have a lightbox with only one image. Yes, I know its not really
Yes, it's a trivial piece of code to write, but I still wonder if
I have upgraded a SharePoint, excatly same code, but now links to pdfs always
i have these html code: <body> <div id=top> <div id=panels> <div id=yes>yes</div> <div id=no>no</div>
Yes, this is one more question about good old div inside td but without
i used self.mapView.showsUserLocation = YES; for showing blue dot (circle) on MKmapview. Its working

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.