Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
272644e3
Commit
272644e3
authored
Mar 27, 2013
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mg_md5 returns char *, not void
parent
55ef3afe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
mongoose.c
mongoose.c
+2
-1
mongoose.h
mongoose.h
+1
-1
No files found.
mongoose.c
View file @
272644e3
...
@@ -2190,7 +2190,7 @@ static void bin2str(char *to, const unsigned char *p, size_t len) {
...
@@ -2190,7 +2190,7 @@ static void bin2str(char *to, const unsigned char *p, size_t len) {
}
}
// Return stringified MD5 hash for list of strings. Buffer must be 33 bytes.
// Return stringified MD5 hash for list of strings. Buffer must be 33 bytes.
void
mg_md5
(
char
buf
[
33
],
...)
{
char
*
mg_md5
(
char
buf
[
33
],
...)
{
unsigned
char
hash
[
16
];
unsigned
char
hash
[
16
];
const
char
*
p
;
const
char
*
p
;
va_list
ap
;
va_list
ap
;
...
@@ -2206,6 +2206,7 @@ void mg_md5(char buf[33], ...) {
...
@@ -2206,6 +2206,7 @@ void mg_md5(char buf[33], ...) {
MD5Final
(
hash
,
&
ctx
);
MD5Final
(
hash
,
&
ctx
);
bin2str
(
buf
,
hash
,
sizeof
(
hash
));
bin2str
(
buf
,
hash
,
sizeof
(
hash
));
return
buf
;
}
}
// Check the user's password, return 1 if OK
// Check the user's password, return 1 if OK
...
...
mongoose.h
View file @
272644e3
...
@@ -340,7 +340,7 @@ const char *mg_version(void);
...
@@ -340,7 +340,7 @@ const char *mg_version(void);
// MD5 hash. Example:
// MD5 hash. Example:
// char buf[33];
// char buf[33];
// mg_md5(buf, "aa", "bb", NULL);
// mg_md5(buf, "aa", "bb", NULL);
void
mg_md5
(
char
buf
[
33
],
...);
char
*
mg_md5
(
char
buf
[
33
],
...);
#ifdef __cplusplus
#ifdef __cplusplus
...
...
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