php从源码中提取数据,从PHP源代码中提取出来的md5 – md5.h

PHP中的md5,核心代码一个字符未动。 应该比较高效和准确了,可以用在C、C++项目中。

md5.h

/*

+----------------------------------------------------------------------+

| PHP Version 5 |

+----------------------------------------------------------------------+

| Copyright (c) 1997-2013 The PHP Group |

+----------------------------------------------------------------------+

| This source file is subject to version 3.01 of the PHP license,|

| that is bundled with this package in the file LICENSE, and is |

| available through the world-wide-web at the following url: |

| http://www.php.net/license/3_01.txt |

| If you did not receive a copy of the PHP license and are unable to|

| obtain it through the world-wide-web, please send a note to |

| license@php.net so we can mail you a copy immediately.|

+----------------------------------------------------------------------+

| Author: Alexander Peslyak (Solar Designer) |

|Rasmus Lerdorf |

+----------------------------------------------------------------------+

*/

#ifndef MD5_H

#define MD5_H

#include

#include

#ifndef __i386__

#define __i386__

#endif

typedef uint32_t php_uint32;

/*

* This is an OpenSSL-compatible implementation of the RSA Data Security,

* Inc. MD5 Message-Digest Algorithm (RFC 1321).

*

* Written by Solar Designer in 2001, and placed

* in the public domain. There's absolutely no warranty.

*

* See md5.c for more information.

*/

/* MD5 context. */

typedef struct {

php_uint32 lo, hi;

php_uint32 a, b, c, d;

unsigned char buffer[64];

php_uint32 block[16];

} PHP_MD5_CTX;

void PHP_MD5Init(PHP_MD5_CTX *ctx);

void PHP_MD5Update(PHP_MD5_CTX *ctx, const void *data, size_t size);

void PHP_MD5Final(unsigned char *result, PHP_MD5_CTX *ctx);

#endif

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值