Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
1ee3b153
Commit
1ee3b153
authored
Jun 07, 2000
by
Brian Wellington
Browse files
Added length constants, changed _final parameter from array to pointer.
parent
fbb2ab30
Changes
4
Hide whitespace changes
Inline
Side-by-side
lib/isc/include/isc/md5.h
View file @
1ee3b153
...
...
@@ -42,6 +42,8 @@
#include
<isc/types.h>
#define ISC_MD5_DIGESTLENGTH 16
typedef
struct
{
isc_uint32_t
buf
[
4
];
isc_uint32_t
bytes
[
2
];
...
...
@@ -52,6 +54,6 @@ void isc_md5_init(isc_md5_t *ctx);
void
isc_md5_invalidate
(
isc_md5_t
*
ctx
);
void
isc_md5_update
(
isc_md5_t
*
ctx
,
const
unsigned
char
*
buf
,
unsigned
int
len
);
void
isc_md5_final
(
isc_md5_t
*
ctx
,
unsigned
char
digest
[
16
]
);
void
isc_md5_final
(
isc_md5_t
*
ctx
,
unsigned
char
*
digest
);
#endif
/* !MD5_H */
lib/isc/include/isc/sha1.h
View file @
1ee3b153
...
...
@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: sha1.h,v 1.
3
2000/06/07 0
0:30:42 explorer
Exp $ */
/* $Id: sha1.h,v 1.
4
2000/06/07 0
2:28:43 bwelling
Exp $ */
/* $NetBSD: sha1.h,v 1.2 1998/05/29 22:55:44 thorpej Exp $ */
...
...
@@ -30,6 +30,8 @@
#include
<isc/types.h>
#define ISC_SHA1_DIGESTLENGTH 20
typedef
struct
{
isc_uint32_t
state
[
5
];
isc_uint32_t
count
[
2
];
...
...
@@ -40,6 +42,6 @@ void isc_sha1_init(isc_sha1_t *ctx);
void
isc_sha1_invalidate
(
isc_sha1_t
*
ctx
);
void
isc_sha1_update
(
isc_sha1_t
*
ctx
,
const
unsigned
char
*
data
,
unsigned
int
len
);
void
isc_sha1_final
(
isc_sha1_t
*
ctx
,
unsigned
char
digest
[
20
]
);
void
isc_sha1_final
(
isc_sha1_t
*
ctx
,
unsigned
char
*
digest
);
#endif
/* ISC_SHA1_H */
lib/isc/md5.c
View file @
1ee3b153
...
...
@@ -216,7 +216,7 @@ isc_md5_update(isc_md5_t *ctx, const unsigned char *buf, unsigned int len) {
* 1 0* (64-bit count of bits processed, MSB-first)
*/
void
isc_md5_final
(
isc_md5_t
*
ctx
,
unsigned
char
digest
[
16
]
)
{
isc_md5_final
(
isc_md5_t
*
ctx
,
unsigned
char
*
digest
)
{
int
count
=
ctx
->
bytes
[
0
]
&
0x3f
;
/* Number of bytes in ctx->in */
unsigned
char
*
p
=
(
unsigned
char
*
)
ctx
->
in
+
count
;
...
...
lib/isc/sha1.c
View file @
1ee3b153
...
...
@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: sha1.c,v 1.
4
2000/06/07 0
1:14:26 explorer
Exp $ */
/* $Id: sha1.c,v 1.
5
2000/06/07 0
2:28:40 bwelling
Exp $ */
/* $NetBSD: sha1.c,v 1.5 2000/01/22 22:19:14 mycroft Exp $ */
/* $OpenBSD: sha1.c,v 1.9 1997/07/23 21:12:32 kstailey Exp $ */
...
...
@@ -224,7 +224,7 @@ static const unsigned char final_200 = '\200';
static
const
unsigned
char
final_0
=
'\0'
;
void
isc_sha1_final
(
isc_sha1_t
*
context
,
unsigned
char
digest
[
20
]
)
{
isc_sha1_final
(
isc_sha1_t
*
context
,
unsigned
char
*
digest
)
{
unsigned
int
i
;
unsigned
char
finalcount
[
8
];
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment