mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-11 23:16:05 +00:00
md5 now use memmove and memset instead of for loops
This commit is contained in:
parent
93b1e2e9aa
commit
b11793df40
@ -274,15 +274,10 @@ static void Decode (ut32 *output, ut8 *input, unsigned int len) {
|
||||
|
||||
/* Note: Replace "for loop" with standard memcpy if possible. */
|
||||
static void MD5_memcpy (ut8 *output, ut8 *input, unsigned int len) {
|
||||
// TODO: use memmove here
|
||||
unsigned int i;
|
||||
for (i = 0; i < len; i++)
|
||||
output[i] = input[i];
|
||||
memmove(output, input, len);
|
||||
}
|
||||
|
||||
/* Note: Replace "for loop" with standard memset if possible. */
|
||||
static void MD5_memset (ut8 *output, int value, unsigned int len) {
|
||||
unsigned int i;
|
||||
for (i = 0; i < len; i++)
|
||||
output[i] = (char)value;
|
||||
memset(output, value, len);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user