-// (1) that MD5 will do what you think it does;
-// (2) that this translation/ modification is accurate; or
+// (1) that MD5 will do what you think it does;
+// (2) that this translation/ modification is accurate; or
// is identified as the "RSA Data Security, Inc. MD5 Message-Digest
// Algorithm" in all material mentioning or referencing this software
// or this function.
// is identified as the "RSA Data Security, Inc. MD5 Message-Digest
// Algorithm" in all material mentioning or referencing this software
// or this function.
// License is also granted to make and use derivative works provided
// that such works are identified as "derived from the RSA Data
// Security, Inc. MD5 Message-Digest Algorithm" in all material
// mentioning or referencing the derived work.
// License is also granted to make and use derivative works provided
// that such works are identified as "derived from the RSA Data
// Security, Inc. MD5 Message-Digest Algorithm" in all material
// mentioning or referencing the derived work.
// RSA Data Security, Inc. makes no representations concerning either
// the merchantability of this software or the suitability of this
// software for any particular purpose. It is provided "as is"
// without express or implied warranty of any kind.
// RSA Data Security, Inc. makes no representations concerning either
// the merchantability of this software or the suitability of this
// software for any particular purpose. It is provided "as is"
// without express or implied warranty of any kind.
// These notices must be retained in any copies of any part of this
// documentation and/or software.
// These notices must be retained in any copies of any part of this
// documentation and/or software.
buffer_space = 64 - buffer_index; // how much space is left in buffer
// Transform as many times as possible.
buffer_space = 64 - buffer_index; // how much space is left in buffer
// Transform as many times as possible.
// and here we do the buffering:
memcpy(buffer+buffer_index, input+input_index, input_length-input_index);
}
void MD5::update(FILE *file) {
// and here we do the buffering:
memcpy(buffer+buffer_index, input+input_index, input_length-input_index);
}
void MD5::update(FILE *file) {
- while ((len=fread(buffer, 1, 1024, file))) update(buffer, len);
+ while ((len=fread(buffer_, 1, 1024, file))) update(buffer_, len);
a += I(b, c, d) + x + ac;
a = rotate_left (a, s) +b;
}
a += I(b, c, d) + x + ac;
a = rotate_left (a, s) +b;
}