मुझे कुछ एमडी 5 कोड मिल गए हैं जिनमें निम्न प्रोटोटाइप शामिल हैं ...सी में स्ट्रिंग का md5 हैश कैसे बनाएं?
मैं यह पता लगाने की कोशिश कर रहा हूं कि मुझे कहां रखना है, मैं कहां रखना चाहता हूं, मुझे कौन से कार्यों को कॉल करने की आवश्यकता है, और स्ट्रिंग को एक बार धोने के बाद कहां मिलना है। मैं uint32 buf [4] और uint32 बिट्स [2] संरचना में हैं के संबंध में उलझन में हूं।
struct MD5Context {
uint32 buf[4];
uint32 bits[2];
unsigned char in[64];
};
/*
* Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
* initialization constants.
*/
void MD5Init(struct MD5Context *context);
/*
* Update context to reflect the concatenation of another buffer full
* of bytes.
*/
void MD5Update(struct MD5Context *context, unsigned char const *buf, unsigned len);
/*
* Final wrapup - pad to 64-byte boundary with the bit pattern
* 1 0* (64-bit count of bits processed, MSB-first)
*/
void MD5Final(unsigned char digest[16], struct MD5Context *context);
/*
* The core of the MD5 algorithm, this alters an existing MD5 hash to
* reflect the addition of 16 longwords of new data. MD5Update blocks
* the data and converts bytes into longwords for this routine.
*/
void MD5Transform(uint32 buf[4], uint32 const in[16]);
अच्छा विचार, एक स्ट्रिंग के लिए हैश के रूपांतरण का प्रदर्शन। – dmckee
हम्म, मुझे 'त्रुटि मिल रही है:' संदर्भ 'का भंडारण आकार ज्ञात नहीं है' मैं 'शामिल हूं ' –
@SSH मुझे विश्वास नहीं है कि ओपीएस कोड openssl का उपयोग कर रहा है। –