releasing/cbrtools/perl/Digest/Perl/MD5.pm
author Ross Qin <ross.qin@nokia.com>
Tue, 30 Nov 2010 14:05:41 +0800
changeset 713 7b7f0409fc00
parent 602 3145852acc89
permissions -rw-r--r--
merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
602
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     1
# This library is free software; you can redistribute it and/or
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     2
# modify it under the same terms as Perl itself.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     3
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     4
#  Copyright 2000 Christian Lackas, Imperia Software Solutions
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     5
#  Copyright 1998-1999 Gisle Aas.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     6
#  Copyright 1995-1996 Neil Winton.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     7
#  Copyright 1991-1992 RSA Data Security, Inc.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     8
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     9
#!/usr/local/bin/perl -w
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    10
#$Id: MD5.pm,v 1.16 2000/09/19 22:19:31 lackas Exp $
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    11
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    12
package Digest::Perl::MD5;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    13
use strict;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    14
use integer;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    15
use Exporter;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    16
use vars qw($VERSION @ISA @EXPORTER @EXPORT_OK);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    17
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    18
@EXPORT_OK = qw(md5 md5_hex md5_base64);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    19
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    20
@ISA = 'Exporter';
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    21
$VERSION = '1.5';
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    22
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    23
# I-Vektor
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    24
sub A() { 0x67_45_23_01 }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    25
sub B() { 0xef_cd_ab_89 }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    26
sub C() { 0x98_ba_dc_fe }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    27
sub D() { 0x10_32_54_76 }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    28
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    29
# for internal use
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    30
sub MAX() { 0xFFFFFFFF }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    31
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    32
# padd a message to a multiple of 64
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    33
sub padding($) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    34
    my $l = length (my $msg = shift() . chr(128));    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    35
    $msg .= "\0" x (($l%64<=56?56:120)-$l%64);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    36
    $l = ($l-1)*8;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    37
    $msg .= pack 'VV', $l & MAX , ($l >> 16 >> 16);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    38
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    39
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    40
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    41
sub rotate_left($$) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    42
	($_[0] << $_[1]) | (( $_[0] >> (32 - $_[1])  )  & ((1 << $_[1]) - 1));
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    43
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    44
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    45
sub gen_code {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    46
  # Discard upper 32 bits on 64 bit archs.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    47
  my $MSK = ((1 << 16) << 16) ? ' & ' . MAX : '';
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    48
  my %f = (
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    49
	FF => "X0=rotate_left((X3^(X1&(X2^X3)))+X0+X4+X6$MSK,X5)+X1$MSK;",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    50
	GG => "X0=rotate_left((X2^(X3&(X1^X2)))+X0+X4+X6$MSK,X5)+X1$MSK;",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    51
	HH => "X0=rotate_left((X1^X2^X3)+X0+X4+X6$MSK,X5)+X1$MSK;",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    52
	II => "X0=rotate_left((X2^(X1|(~X3)))+X0+X4+X6$MSK,X5)+X1$MSK;",
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    53
  );
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    54
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    55
  my %s = (  # shift lengths
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    56
	S11 => 7, S12 => 12, S13 => 17, S14 => 22, S21 => 5, S22 => 9, S23 => 14,
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    57
	S24 => 20, S31 => 4, S32 => 11, S33 => 16, S34 => 23, S41 => 6, S42 => 10,
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    58
	S43 => 15, S44 => 21
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    59
  );
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    60
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    61
  my $insert = "";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    62
  while(<DATA>) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    63
	chomp;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    64
	next unless /^[FGHI]/;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    65
	my ($func,@x) = split /,/;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    66
	my $c = $f{$func};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    67
	$c =~ s/X(\d)/$x[$1]/g;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    68
	$c =~ s/(S\d{2})/$s{$1}/;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    69
        $c =~ s/^(.*)=rotate_left\((.*),(.*)\)\+(.*)$//;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    70
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    71
	$c = "\$r = $2;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    72
        $1 = ((\$r << $3) | ((\$r >> (32 - $3))  & ((1 << $3) - 1))) + $4";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    73
	$insert .= "\t$c\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    74
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    75
  
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    76
  my $dump = '
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    77
  sub round {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    78
	my ($a,$b,$c,$d) = @_[0 .. 3];
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    79
	my $r;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    80
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    81
	' . $insert . '
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    82
	$_[0]+$a' . $MSK . ', $_[1]+$b ' . $MSK . 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    83
        ', $_[2]+$c' . $MSK . ', $_[3]+$d' . $MSK . ';
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    84
  }';
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    85
  eval $dump;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    86
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    87
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    88
gen_code();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    89
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    90
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    91
# object part of this module
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    92
sub new {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    93
	my $class = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    94
	bless {}, ref($class) || $class;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    95
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    96
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    97
sub reset {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    98
	my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    99
	delete $self->{data};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   100
	$self
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   101
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   102
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   103
sub add(@) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   104
	my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   105
	$self->{data} .= join'', @_;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   106
	$self
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   107
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   108
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   109
sub addfile {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   110
  	my ($self,$fh) = @_;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   111
	if (!ref($fh) && ref(\$fh) ne "GLOB") {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   112
	    require Symbol;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   113
	    $fh = Symbol::qualify($fh, scalar caller);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   114
	}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   115
	$self->{data} .= do{local$/;<$fh>};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   116
	$self
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   117
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   118
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   119
sub digest {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   120
	md5(shift->{data})
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   121
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   122
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   123
sub hexdigest {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   124
	md5_hex(shift->{data})
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   125
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   126
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   127
sub b64digest {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   128
	md5_base64(shift->{data})
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   129
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   130
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   131
sub md5(@) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   132
	my $message = padding(join'',@_);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   133
	my ($a,$b,$c,$d) = (A,B,C,D);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   134
	my $i;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   135
	for $i (0 .. (length $message)/64-1) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   136
		my @X = unpack 'V16', substr $message,$i*64,64;	
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   137
		($a,$b,$c,$d) = round($a,$b,$c,$d,@X);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   138
	}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   139
	pack 'V4',$a,$b,$c,$d;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   140
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   141
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   142
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   143
sub md5_hex(@) {  
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   144
  unpack 'H*', &md5;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   145
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   146
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   147
sub md5_base64(@) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   148
  encode_base64(&md5);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   149
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   150
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   151
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   152
sub encode_base64 ($) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   153
    my $res;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   154
    while ($_[0] =~ /(.{1,45})/gs) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   155
	$res .= substr pack('u', $1), 1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   156
	chop $res;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   157
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   158
    $res =~ tr|` -_|AA-Za-z0-9+/|;#`
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   159
    chop $res;chop $res;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   160
    $res;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   161
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   162
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   163
1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   164
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   165
=head1 NAME
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   166
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   167
Digest::MD5::Perl - Perl implementation of Ron Rivests MD5 Algorithm
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   168
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   169
=head1 DISCLAIMER
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   170
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   171
This is B<not> an interface (like C<Digest::MD5>) but a Perl implementation of MD5.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   172
It is written in perl only and because of this it is slow but it works without C-Code.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   173
You should use C<Digest::MD5> instead of this module if it is available.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   174
This module is only usefull for
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   175
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   176
=over 4
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   177
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   178
=item
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   179
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   180
computers where you cannot install C<Digest::MD5> (e.g. lack of a C-Compiler)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   181
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   182
=item
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   183
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   184
encrypting only small amounts of data (less than one million bytes). I use it to
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   185
hash passwords.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   186
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   187
=item
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   188
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   189
educational purposes
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   190
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   191
=back
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   192
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   193
=head1 SYNOPSIS
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   194
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   195
 # Functional style
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   196
 use Digest::MD5  qw(md5 md5_hex md5_base64);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   197
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   198
 $hash = md5 $data;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   199
 $hash = md5_hex $data;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   200
 $hash = md5_base64 $data;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   201
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   202
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   203
 # OO style
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   204
 use Digest::MD5;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   205
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   206
 $ctx = Digest::MD5->new;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   207
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   208
 $ctx->add($data);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   209
 $ctx->addfile(*FILE);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   210
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   211
 $digest = $ctx->digest;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   212
 $digest = $ctx->hexdigest;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   213
 $digest = $ctx->b64digest;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   214
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   215
=head1 DESCRIPTION
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   216
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   217
This modules has the same interface as the much faster C<Digest::MD5>. So you can
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   218
easily exchange them, e.g.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   219
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   220
	BEGIN {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   221
	  eval {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   222
	    require Digest::MD5;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   223
	    import Digest::MD5 'md5_hex'
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   224
	  };
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   225
	  if ($@) { # ups, no Digest::MD5
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   226
	    require Digest::Perl::MD5;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   227
	    import Digest::Perl::MD5 'md5_hex'
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   228
	  }		
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   229
	}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   230
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   231
If the C<Digest::MD5> module is available it is used and if not you take
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   232
C<Digest::Perl::MD5>.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   233
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   234
You can also install the Perl part of Digest::MD5 together with Digest::Perl::MD5
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   235
and use Digest::MD5 as normal, it falls back to Digest::Perl::MD5 if it
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   236
cannot load its object files.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   237
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   238
For a detailed Documentation see the C<Digest::MD5> module.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   239
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   240
=head1 EXAMPLES
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   241
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   242
The simplest way to use this library is to import the md5_hex()
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   243
function (or one of its cousins):
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   244
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   245
    use Digest::Perl::MD5 'md5_hex';
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   246
    print 'Digest is ', md5_hex('foobarbaz'), "\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   247
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   248
The above example would print out the message
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   249
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   250
    Digest is 6df23dc03f9b54cc38a0fc1483df6e21
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   251
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   252
provided that the implementation is working correctly.  The same
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   253
checksum can also be calculated in OO style:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   254
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   255
    use Digest::MD5;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   256
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   257
    $md5 = Digest::MD5->new;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   258
    $md5->add('foo', 'bar');
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   259
    $md5->add('baz');
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   260
    $digest = $md5->hexdigest;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   261
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   262
    print "Digest is $digest\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   263
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   264
=head1 LIMITATIONS
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   265
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   266
This implementation of the MD5 algorithm has some limitations:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   267
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   268
=over 4
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   269
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   270
=item
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   271
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   272
It's slow, very slow. I've done my very best but Digest::MD5 is still about 135 times faster.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   273
You can only encrypt Data up to one million bytes in an acceptable time. But it's very usefull
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   274
for encrypting small amounts of data like passwords.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   275
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   276
=item
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   277
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   278
You can only encrypt up to 2^32 bits = 512 MB on 32bit archs. You should use C<Digest::MD5>
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   279
for those amounts of data.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   280
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   281
=item
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   282
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   283
C<Digest::Perl::MD5> loads all data to encrypt into memory. This is a todo.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   284
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   285
=back
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   286
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   287
=head1 SEE ALSO
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   288
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   289
L<Digest::MD5>
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   290
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   291
L<md5sum(1)>
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   292
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   293
RFC 1321
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   294
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   295
=head1 COPYRIGHT
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   296
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   297
This library is free software; you can redistribute it and/or
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   298
modify it under the same terms as Perl itself.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   299
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   300
 Copyright 2000 Christian Lackas, Imperia Software Solutions
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   301
 Copyright 1998-1999 Gisle Aas.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   302
 Copyright 1995-1996 Neil Winton.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   303
 Copyright 1991-1992 RSA Data Security, Inc.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   304
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   305
The MD5 algorithm is defined in RFC 1321. The basic C code
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   306
implementing the algorithm is derived from that in the RFC and is
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   307
covered by the following copyright:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   308
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   309
=over 4
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   310
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   311
=item
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   312
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   313
Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   314
rights reserved.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   315
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   316
License to copy and use this software is granted provided that it
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   317
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   318
Algorithm" in all material mentioning or referencing this software
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   319
or this function.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   320
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   321
License is also granted to make and use derivative works provided
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   322
that such works are identified as "derived from the RSA Data
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   323
Security, Inc. MD5 Message-Digest Algorithm" in all material
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   324
mentioning or referencing the derived work.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   325
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   326
RSA Data Security, Inc. makes no representations concerning either
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   327
the merchantability of this software or the suitability of this
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   328
software for any particular purpose. It is provided "as is"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   329
without express or implied warranty of any kind.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   330
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   331
These notices must be retained in any copies of any part of this
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   332
documentation and/or software.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   333
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   334
=back
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   335
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   336
This copyright does not prohibit distribution of any version of Perl
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   337
containing this extension under the terms of the GNU or Artistic
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   338
licenses.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   339
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   340
=head1 AUTHORS
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   341
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   342
The original MD5 interface was written by Neil Winton
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   343
(C<N.Winton@axion.bt.co.uk>).
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   344
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   345
C<Digest::MD5> was made by Gisle Aas <gisle@aas.no> (I took his Interface
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   346
and part of the documentation)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   347
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   348
Thanks to Guido Flohr for his 'use integer'-hint.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   349
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   350
This release was made by Christian Lackas <delta@clackas.de>.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   351
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   352
=cut
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   353
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   354
__DATA__
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   355
FF,$a,$b,$c,$d,$_[4],7,0xd76aa478,/* 1 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   356
FF,$d,$a,$b,$c,$_[5],12,0xe8c7b756,/* 2 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   357
FF,$c,$d,$a,$b,$_[6],17,0x242070db,/* 3 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   358
FF,$b,$c,$d,$a,$_[7],22,0xc1bdceee,/* 4 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   359
FF,$a,$b,$c,$d,$_[8],7,0xf57c0faf,/* 5 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   360
FF,$d,$a,$b,$c,$_[9],12,0x4787c62a,/* 6 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   361
FF,$c,$d,$a,$b,$_[10],17,0xa8304613,/* 7 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   362
FF,$b,$c,$d,$a,$_[11],22,0xfd469501,/* 8 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   363
FF,$a,$b,$c,$d,$_[12],7,0x698098d8,/* 9 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   364
FF,$d,$a,$b,$c,$_[13],12,0x8b44f7af,/* 10 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   365
FF,$c,$d,$a,$b,$_[14],17,0xffff5bb1,/* 11 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   366
FF,$b,$c,$d,$a,$_[15],22,0x895cd7be,/* 12 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   367
FF,$a,$b,$c,$d,$_[16],7,0x6b901122,/* 13 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   368
FF,$d,$a,$b,$c,$_[17],12,0xfd987193,/* 14 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   369
FF,$c,$d,$a,$b,$_[18],17,0xa679438e,/* 15 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   370
FF,$b,$c,$d,$a,$_[19],22,0x49b40821,/* 16 */ 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   371
GG,$a,$b,$c,$d,$_[5],5,0xf61e2562,/* 17 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   372
GG,$d,$a,$b,$c,$_[10],9,0xc040b340,/* 18 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   373
GG,$c,$d,$a,$b,$_[15],14,0x265e5a51,/* 19 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   374
GG,$b,$c,$d,$a,$_[4],20,0xe9b6c7aa,/* 20 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   375
GG,$a,$b,$c,$d,$_[9],5,0xd62f105d,/* 21 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   376
GG,$d,$a,$b,$c,$_[14],9,0x2441453,/* 22 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   377
GG,$c,$d,$a,$b,$_[19],14,0xd8a1e681,/* 23 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   378
GG,$b,$c,$d,$a,$_[8],20,0xe7d3fbc8,/* 24 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   379
GG,$a,$b,$c,$d,$_[13],5,0x21e1cde6,/* 25 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   380
GG,$d,$a,$b,$c,$_[18],9,0xc33707d6,/* 26 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   381
GG,$c,$d,$a,$b,$_[7],14,0xf4d50d87,/* 27 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   382
GG,$b,$c,$d,$a,$_[12],20,0x455a14ed,/* 28 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   383
GG,$a,$b,$c,$d,$_[17],5,0xa9e3e905,/* 29 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   384
GG,$d,$a,$b,$c,$_[6],9,0xfcefa3f8,/* 30 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   385
GG,$c,$d,$a,$b,$_[11],14,0x676f02d9,/* 31 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   386
GG,$b,$c,$d,$a,$_[16],20,0x8d2a4c8a,/* 32 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   387
HH,$a,$b,$c,$d,$_[9],4,0xfffa3942,/* 33 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   388
HH,$d,$a,$b,$c,$_[12],11,0x8771f681,/* 34 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   389
HH,$c,$d,$a,$b,$_[15],16,0x6d9d6122,/* 35 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   390
HH,$b,$c,$d,$a,$_[18],23,0xfde5380c,/* 36 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   391
HH,$a,$b,$c,$d,$_[5],4,0xa4beea44,/* 37 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   392
HH,$d,$a,$b,$c,$_[8],11,0x4bdecfa9,/* 38 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   393
HH,$c,$d,$a,$b,$_[11],16,0xf6bb4b60,/* 39 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   394
HH,$b,$c,$d,$a,$_[14],23,0xbebfbc70,/* 40 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   395
HH,$a,$b,$c,$d,$_[17],4,0x289b7ec6,/* 41 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   396
HH,$d,$a,$b,$c,$_[4],11,0xeaa127fa,/* 42 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   397
HH,$c,$d,$a,$b,$_[7],16,0xd4ef3085,/* 43 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   398
HH,$b,$c,$d,$a,$_[10],23,0x4881d05,/* 44 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   399
HH,$a,$b,$c,$d,$_[13],4,0xd9d4d039,/* 45 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   400
HH,$d,$a,$b,$c,$_[16],11,0xe6db99e5,/* 46 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   401
HH,$c,$d,$a,$b,$_[19],16,0x1fa27cf8,/* 47 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   402
HH,$b,$c,$d,$a,$_[6],23,0xc4ac5665,/* 48 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   403
II,$a,$b,$c,$d,$_[4],6,0xf4292244,/* 49 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   404
II,$d,$a,$b,$c,$_[11],10,0x432aff97,/* 50 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   405
II,$c,$d,$a,$b,$_[18],15,0xab9423a7,/* 51 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   406
II,$b,$c,$d,$a,$_[9],21,0xfc93a039,/* 52 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   407
II,$a,$b,$c,$d,$_[16],6,0x655b59c3,/* 53 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   408
II,$d,$a,$b,$c,$_[7],10,0x8f0ccc92,/* 54 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   409
II,$c,$d,$a,$b,$_[14],15,0xffeff47d,/* 55 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   410
II,$b,$c,$d,$a,$_[5],21,0x85845dd1,/* 56 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   411
II,$a,$b,$c,$d,$_[12],6,0x6fa87e4f,/* 57 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   412
II,$d,$a,$b,$c,$_[19],10,0xfe2ce6e0,/* 58 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   413
II,$c,$d,$a,$b,$_[10],15,0xa3014314,/* 59 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   414
II,$b,$c,$d,$a,$_[17],21,0x4e0811a1,/* 60 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   415
II,$a,$b,$c,$d,$_[8],6,0xf7537e82,/* 61 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   416
II,$d,$a,$b,$c,$_[15],10,0xbd3af235,/* 62 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   417
II,$c,$d,$a,$b,$_[6],15,0x2ad7d2bb,/* 63 */
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   418
II,$b,$c,$d,$a,$_[13],21,0xeb86d391,/* 64 */