Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Çó´¿C»òC++ϵÄMD5¼ÓÃÜÔ´Â룡

ÈçÌ⣬²¢ÇÒÂé·³Ìṩһϵ÷Ó÷½·¨£¬Ð»Ð»£¡
C/C++ code:
http://www.faqs.org/rfcs/rfc1321.html

×îÏÂÃæÓÐÔ´ÂëÒÔ¼°µ÷Óõķ½·¨¡£

C/C++ code:

//md5.h

#pragma once
#include <string>

typedef unsigned char UINT1;
typedef unsigned char * POINTER;
typedef unsigned short UINT2;
typedef unsigned long UINT4;


/* MD5 context */
typedef struct {
UINT4 state[4]; // state (ABCD)
UINT4 count[2]; // number of bit, modulo 2 ^ 64
UINT1 buffer[64]; // input buffer
} MD5_CTX;

void MD5Init(MD5_CTX*);
void MD5Update(MD5_CTX *, UINT1 *, UINT4);
void MD5Final(UINT1 [16], MD5_CTX *);
std::string MD5Result(UINT1 [16]);
std::string MD5Encode(char* src);

//////////////////////////////////////////////////////////////////////////////

//md5.cpp

#include "stdafx.h"
#include "MD5.h"


#define S11 7
#define S12 12
#define S13 17
#define S14 22
#define S21 5
#define S22 9
#define S23 14
#define S24 20
#define S31 4
#define S32 11
#define S33 16
#define S34 23
#define S41 6
#define S42 10
#define S43 15
#define S44 21

static void MD5Transform(UINT4 [4], unsigned char [64]);
static void Encode(UINT1 *, UINT4 *, UINT4);
static vo


Ïà¹ØÎÊ´ð£º

C ³ÌÐòÎÊÌâ (¶þ) - C/C++ / CÓïÑÔ

ÎÊһϣº
#include <stdio.h>
int main()
{
  char x, y, z;
  int i;
  int a[16];
  for(i=0; i<=16; i++)
  {
  a[i] = 0;
  ......

c,c++Á¬½Ómysql ÕÒ²»µ½Í·²¿Îļþ£¨ÐÂÊÖ£©

±àÒëÆ÷£ºC-Free4
mysql µ¥¶À°²×°µÄ£¬ÏÖÔÚΪapache+php+mysql¿ÉÒÔʹÓá£
×î½üÔÚÁ·Ï°c£¬c++£»ÏëÓÃc£¬c++Á¬½ÓÏÂÎÒµÄmysql£¬ºÃ¶àµØ·½¶à˵mysql.hÕÒ²»µ½¡£¶øÇÒÎÒmysqlûÓÐËùνµÄincludeÎļþ¼Ð°¡¡£
Íü¸ßÊÖÖ¸µãÒ»¶ ......

ÓÃc/c++¶¨Î»É¾³ýÒ»ÐеÄÎÊÌâ

ÓÃc/c++¶¨Î»É¾³ýÒ»ÐеÄÎÊÌâ¡£

ÎÊÌâ±³¾°£º

ËùÐèÊý¾ÝÏ൱´ó¡£aÓëbÎļþ¾ùΪһ×éÎļþ£¨a1£¬a2¡­£¬b1£¬b2¡­£©£¬aÎļþÓÐ×î´óÊý¾ÝÐÐÊý£¨Èç5000£©£¬ÒÔÐеÄÐÎʽ£¬´ÓaÎļþÖжÁÈ¡Êý¾Ý£¬½«aÖв»ÄÜ´¦ÀíµÄÊý¾Ý·ÅÔÚbÎ ......

linux»·¾³ÏÂgethostbynameº¯ÊýÎÊÌâ - C/C++ / CÓïÑÔ

дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
   
  struct hostent *hp; 
char AlarmDevIP[20];  
  int x2;

hp = gethostbyname("www.google.com");
if (hp)
{ ......

C ³ÌÐòÎÊÌâ (Èý) - C/C++ / CÓïÑÔ

ÎÊÌâÒ»£º
ÔÚ¶ÔÆëΪ4µÄÇé¿öÏÂ
struct BBB
{
long num£»
char *name;
short int data;
char ha;
short ba[5];
}*p;
p=0x1000000;
p+0x200=____;
(Ulong)p+0x200=____;
(char*)p+0x200=____;
¼ÙÉèÔÚ32λC ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ