Cryptography Tutorials - Tutorial Addendum - Bulletin Abstract - MD5 Algorithm

arcadegamesios strategygamesios adventuregamesios
 31 December 18:00   

    



    



    

(Continued from antecedent part...)

    



    

If you run this sample program with JDK 1.5, you should get the afterward output:

    

 

    

Message abstract item info:

    

Algorithm = MD5

    

Provider = SUN adaptation 1.5

    

toString = MD5 Bulletin abstract from SUN, <initialized>

    

MD5("") =

    

D41D8CD98F00B204E9800998ECF8427E

    

MD5("abc") =

    

900150983CD24FB0D6963F7D28E17F72

    

MD5("abcdefghijklmnopqrstuvwxyz") =

    

C3FCD3D76192E4007DFB496CCA67E13B

    



    



    



    

The achievement matches the testing aftereffect listed in RFC 1321.

    



    

MD5 Accomplishing in PHP

    



    

If you are absorbed in using MD5 in PHP, you can use the congenital action md5().

    

Here is a sample program assuming you how to use md5() function:

    

 

    

<?php # PhpMd5Test.php

    

# Absorb (c) 2006 by Dr. Yang, http://www.yang.com/

    

#

    

$input = "";

    

$output = md5($input);

    

print("
");

    

print("MD5("".$input."") =
");

    

print(" $output
");

    

$input = "abc";

    

$output = md5($input);

    

print("
");

    

print("MD5("".$input."") =
");

    

print(" $output
");

    

$input = "abcdefghijklmnopqrstuvwxyz";

    

$output = md5($input);

    

print("
");

    

print("MD5("".$input."") =
");

    

print(" $output
");

    

?>

    



    



    

If you run this sample program with PHP 5, you should get:

    

 

    

MD5("") =

    

d41d8cd98f00b204e9800998ecf8427e

    

MD5("abc") =

    

900150983cd24fb0d6963f7d28e17f72

    



    

MD5("abcdefghijklmnopqrstuvwxyz") =

    

c3fcd3d76192e4007dfb496cca67e13b

    



    

(Continued on next part...)

    



    



    

 


Tags: program, message, sample, notes, tutorial, tutorials, print

 print, input, output, message, digest, output , program, algorithm, sample, abcdefghijklmnopqrstuvwxyz, , message digest, print md5, print output , input print, md5 input, sample program, output md5, md5 input print, print output input, sample program with, notes message digest, tutorials tutorial notes, tutorial notes message, cryptography tutorials tutorial,

Share Cryptography Tutorials - Tutorial Addendum - Bulletin Abstract - MD5 Algorithm:
Digg it!   Google Bookmarks   Del.icio.us   Yahoo! MyWeb   Furl  Binklist   Reddit!   Stumble Upon   Technorati   Windows Live   Bookmark

Text link code :
Hyper link code:

Also see ...

Permalink
Article In : Computers & Technology  -  crypto