unix/linux general net toolkit

源代码在线查看: md5.sgml

软件大小: 595 K
上传用户: stone825
关键词: general toolkit linux unix
下载地址: 免注册下载 普通下载 VIP

相关代码

								MD5												MD5 hash																The MD5 module provide support for computing and manipulating MD5				hashes.  MD5 is a hash function with a very low probability of				collision.  MD5 is considered weaker than SHA.																An MD5 can be calculated at one time or incrementally.  To create a				MD5 at one time, call gnet_md5_new() with the data.  To create a MD5				incrementally, call gnet_md5_new_incremental() to create the MD5				object, then gnet_md5_update() one or more times with data to hash,				and finally call gnet_md5_final().																To get the digest, or hash value, call gnet_md5_get_digest().  This				returns the raw digest as an array of %GNET_MD5_HASH_LENGTH bytes.  To				get the digest as a human-readable hexidecimal string, call				gnet_md5_get_string() or gnet_md5_copy_string().																								gchar buffer[] = "Hello world!";				gchar buffer2[] = "Second line";				GMD5*  md5;				gchar* md5_str;								&comstart; Compute an MD5 at one time &comend;				md5 = gnet_md5_new (buffer, strlen(buffer));								md5_str = gnet_md5_get_string (md5);				g_print ("The MD5 of %s is %s\n", buffer, md5_str);								&comstart; Use MD5... &comend;								g_free (md5_str);				gnet_md5_delete (md5);								&comstart; Compute an MD5 incrementally &comend;				md5 = gnet_md5_new_incremental ();				gnet_md5_update (md5, buffer, strlen(buffer));				gnet_md5_update (md5, buffer2, strlen(buffer2));				gnet_md5_final (md5);								&comstart; Use MD5... &comend;								gnet_md5_delete (md5);																																																																																																																@buffer: 				@length: 				@Returns: 																																@str: 				@Returns: 																																@md5: 				@Returns: 								@gmd5: 																																@md5: 								@gmd5: 																																@Returns: 																																@md5: 				@buffer: 				@length: 								@gmd5: 																																@md5: 								@gmd5: 																																@p1: 				@p2: 				@Returns: 																																@p: 				@Returns: 																																@md5: 				@Returns: 								@gmd5: 																																@md5: 				@Returns: 								@gmd5: 																																@md5: 				@buffer: 								@gmd5: 															

相关资源