Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
8415b4a2
Commit
8415b4a2
authored
21 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
removed usage of a silly macro instead of the actual functions memcpy
and memset
parent
e4916145
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/md5.c
+4
-8
4 additions, 8 deletions
lib/md5.c
with
4 additions
and
8 deletions
lib/md5.c
+
4
−
8
View file @
8415b4a2
...
...
@@ -92,9 +92,6 @@ static void MD5Transform(UINT4 [4], unsigned char [64]);
static
void
Encode
(
unsigned
char
*
,
UINT4
*
,
unsigned
int
);
static
void
Decode
(
UINT4
*
,
unsigned
char
*
,
unsigned
int
);
#define MD5_memcpy(dst,src,len) memcpy(dst,src,len)
#define MD5_memset(dst,val,len) memset(dst,val,len)
static
unsigned
char
PADDING
[
64
]
=
{
0x80
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
...
...
@@ -174,7 +171,7 @@ unsigned int inputLen; /* length of input block */
/* Transform as many times as possible. */
if
(
inputLen
>=
partLen
)
{
MD5_
memcpy
((
void
*
)
&
context
->
buffer
[
bufindex
],
(
void
*
)
input
,
partLen
);
memcpy
((
void
*
)
&
context
->
buffer
[
bufindex
],
(
void
*
)
input
,
partLen
);
MD5Transform
(
context
->
state
,
context
->
buffer
);
for
(
i
=
partLen
;
i
+
63
<
inputLen
;
i
+=
64
)
...
...
@@ -186,8 +183,7 @@ unsigned int inputLen; /* length of input block */
i
=
0
;
/* Buffer remaining input */
MD5_memcpy
((
void
*
)
&
context
->
buffer
[
bufindex
],
(
void
*
)
&
input
[
i
],
inputLen
-
i
);
memcpy
((
void
*
)
&
context
->
buffer
[
bufindex
],
(
void
*
)
&
input
[
i
],
inputLen
-
i
);
}
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
...
...
@@ -215,7 +211,7 @@ struct md5_ctx *context; /* context */
Encode
(
digest
,
context
->
state
,
16
);
/* Zeroize sensitive information. */
MD5_
memset
((
void
*
)
context
,
0
,
sizeof
(
*
context
));
memset
((
void
*
)
context
,
0
,
sizeof
(
*
context
));
}
/* MD5 basic transformation. Transforms state based on block. */
...
...
@@ -305,7 +301,7 @@ unsigned char block[64];
state
[
3
]
+=
d
;
/* Zeroize sensitive information. */
MD5_
memset
((
void
*
)
x
,
0
,
sizeof
(
x
));
memset
((
void
*
)
x
,
0
,
sizeof
(
x
));
}
/* Encodes input (UINT4) into output (unsigned char). Assumes len is
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment