Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
4e4b03cd
Commit
4e4b03cd
authored
Sep 01, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixup AddMD5 prototype
parent
103b8ce8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
include/vlc_md5.h
include/vlc_md5.h
+1
-1
src/misc/md5.c
src/misc/md5.c
+5
-4
No files found.
include/vlc_md5.h
View file @
4e4b03cd
...
...
@@ -43,7 +43,7 @@ struct md5_s
};
VLC_EXPORT
(
void
,
InitMD5
,
(
struct
md5_s
*
)
);
VLC_EXPORT
(
void
,
AddMD5
,
(
struct
md5_s
*
,
const
uint8_t
*
,
uint32
_t
)
);
VLC_EXPORT
(
void
,
AddMD5
,
(
struct
md5_s
*
,
const
void
*
,
size
_t
)
);
VLC_EXPORT
(
void
,
EndMD5
,
(
struct
md5_s
*
)
);
#endif
src/misc/md5.c
View file @
4e4b03cd
...
...
@@ -159,10 +159,10 @@ void InitMD5( struct md5_s *p_md5 )
/*****************************************************************************
* AddMD5: add i_len bytes to an MD5 message
*****************************************************************************/
void
AddMD5
(
struct
md5_s
*
p_md5
,
const
uint8_t
*
p_src
,
uint32
_t
i_len
)
void
AddMD5
(
struct
md5_s
*
p_md5
,
const
void
*
p_src
,
size
_t
i_len
)
{
unsigned
int
i_current
;
/* Current bytes in the spare buffer */
unsigned
in
t
i_offset
=
0
;
size_
t
i_offset
=
0
;
i_current
=
(
p_md5
->
i_bits
/
8
)
&
63
;
...
...
@@ -185,14 +185,15 @@ void AddMD5( struct md5_s *p_md5, const uint8_t *p_src, uint32_t i_len )
while
(
i_len
>=
64
)
{
uint32_t
p_tmp
[
16
];
memcpy
(
p_tmp
,
p_src
+
i_offset
,
64
);
memcpy
(
p_tmp
,
((
const
uint8_t
*
)
p_src
)
+
i_offset
,
64
);
DigestMD5
(
p_md5
,
p_tmp
);
i_offset
+=
64
;
i_len
-=
64
;
}
/* Copy our remaining data to the message's spare buffer */
memcpy
(
((
uint8_t
*
)
p_md5
->
p_data
)
+
i_current
,
p_src
+
i_offset
,
i_len
);
memcpy
(
((
uint8_t
*
)
p_md5
->
p_data
)
+
i_current
,
((
const
uint8_t
*
)
p_src
)
+
i_offset
,
i_len
);
}
/*****************************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment