Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Sep 4 09:13:43 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id m84GDh3d023537 for ; Thu, 4 Sep 2008 09:13:43 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id m84GBjxD005639 for ; Thu, 4 Sep 2008 09:11:45 -0700 Message-Id: <200809041611.m84GBjxD005639@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: cs-551 warmup-1 Date: Thu, 04 Sep 2008 09:11:45 -0700 From: Bill Cheng Someone wrote: > Respected Sir,I am trying to find the MD5 value for the test cases which you > have given. However, for the file /etc/passwd when i try finding the MD5 it > misses out on a '0'. Thus, the MD5 is "26a948ab7bd6d3ab622ac9d6e1fe26" > instead of "026a948ab7bd6d3ab622ac9d6e1f0e26" which is found by using the > openssl command. The problem is with your print routine! As I've mentioned in class, you should use the debugger to see what's in memory and not trust your print routine because your print routine may be buggy! If you examine the buffer returned by MD5_Final(), you should see that the first byte is 0x02. So, you should print "02" and not "2". -- Bill Cheng // bill.cheng@usc.edu