1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00

Make php_MD5* functions available from shared extensions

This commit is contained in:
Frank M. Kromann
2001-12-03 05:14:28 +00:00
parent 8e40864770
commit e7ef5041d5
2 changed files with 8 additions and 7 deletions

View File

@@ -28,7 +28,7 @@
#include "md5.h"
static void make_digest(char *md5str, unsigned char *digest)
PHPAPI void make_digest(char *md5str, unsigned char *digest)
{
int i;
@@ -213,7 +213,7 @@ static unsigned char PADDING[64] =
/* {{{ PHP_MD5Init
* MD5 initialization. Begins an MD5 operation, writing a new context.
*/
void PHP_MD5Init(PHP_MD5_CTX * context)
PHPAPI void PHP_MD5Init(PHP_MD5_CTX * context)
{
context->count[0] = context->count[1] = 0;
/* Load magic initialization constants.
@@ -230,7 +230,7 @@ void PHP_MD5Init(PHP_MD5_CTX * context)
operation, processing another message block, and updating the
context.
*/
void PHP_MD5Update(PHP_MD5_CTX * context, const unsigned char *input,
PHPAPI void PHP_MD5Update(PHP_MD5_CTX * context, const unsigned char *input,
unsigned int inputLen)
{
unsigned int i, index, partLen;
@@ -271,7 +271,7 @@ void PHP_MD5Update(PHP_MD5_CTX * context, const unsigned char *input,
MD5 finalization. Ends an MD5 message-digest operation, writing the
the message digest and zeroizing the context.
*/
void PHP_MD5Final(unsigned char digest[16], PHP_MD5_CTX * context)
PHPAPI void PHP_MD5Final(unsigned char digest[16], PHP_MD5_CTX * context)
{
unsigned char bits[8];
unsigned int index, padLen;

View File

@@ -54,9 +54,10 @@ typedef struct {
unsigned char buffer[64]; /* input buffer */
} PHP_MD5_CTX;
void PHP_MD5Init(PHP_MD5_CTX *);
void PHP_MD5Update(PHP_MD5_CTX *, const unsigned char *, unsigned int);
void PHP_MD5Final(unsigned char[16], PHP_MD5_CTX *);
PHPAPI void make_digest(char *md5str, unsigned char *digest);
PHPAPI void PHP_MD5Init(PHP_MD5_CTX *);
PHPAPI void PHP_MD5Update(PHP_MD5_CTX *, const unsigned char *, unsigned int);
PHPAPI void PHP_MD5Final(unsigned char[16], PHP_MD5_CTX *);
PHP_NAMED_FUNCTION(php_if_md5);
PHP_NAMED_FUNCTION(php_if_md5_file);