libpurple/plugins/ciphertest.c

changeset 22104
56970903b8e9
parent 20288
5ca925a094e2
child 33909
773899cbd05a
equal deleted inserted replaced
22103:f11f1570cd4d 22104:56970903b8e9
59 "56789012345678901234567890", "57edf4a22be3c955ac49da2e2107b67a"}, 59 "56789012345678901234567890", "57edf4a22be3c955ac49da2e2107b67a"},
60 { NULL, NULL } 60 { NULL, NULL }
61 }; 61 };
62 62
63 static void 63 static void
64 cipher_test_md5() { 64 cipher_test_md5(void) {
65 PurpleCipher *cipher; 65 PurpleCipher *cipher;
66 PurpleCipherContext *context; 66 PurpleCipherContext *context;
67 gchar digest[33]; 67 gchar digest[33];
68 gboolean ret; 68 gboolean ret;
69 gint i = 0; 69 gint i = 0;
111 **************************************************************************/ 111 **************************************************************************/
112 struct test sha1_tests[5] = { 112 struct test sha1_tests[5] = {
113 {"a", "86f7e437faa5a7fce15d1ddcb9eaeaea377667b8"}, 113 {"a", "86f7e437faa5a7fce15d1ddcb9eaeaea377667b8"},
114 {"abc", "a9993e364706816aba3e25717850c26c9cd0d89d"} , 114 {"abc", "a9993e364706816aba3e25717850c26c9cd0d89d"} ,
115 {"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", "84983e441c3bd26ebaae4aa1f95129e5e54670f1"} , 115 {"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", "84983e441c3bd26ebaae4aa1f95129e5e54670f1"} ,
116 {NULL, "34aa973cd4c4daa4f61eeb2bdbad27316534016f"}, 116 {NULL, "34aa973cd4c4daa4f61eeb2bdbad27316534016f"},
117 {NULL, NULL} 117 {NULL, NULL}
118 }; 118 };
119 119
120 static void 120 static void
121 cipher_test_sha1() { 121 cipher_test_sha1(void) {
122 PurpleCipher *cipher; 122 PurpleCipher *cipher;
123 PurpleCipherContext *context; 123 PurpleCipherContext *context;
124 gchar digest[41]; 124 gchar digest[41];
125 gint i = 0; 125 gint i = 0;
126 gboolean ret; 126 gboolean ret;
174 174
175 purple_debug_info("cipher-test", "sha1 tests completed\n\n"); 175 purple_debug_info("cipher-test", "sha1 tests completed\n\n");
176 } 176 }
177 177
178 static void 178 static void
179 cipher_test_digest() 179 cipher_test_digest(void)
180 { 180 {
181 const gchar *nonce = "dcd98b7102dd2f0e8b11d0f600bfb0c093"; 181 const gchar *nonce = "dcd98b7102dd2f0e8b11d0f600bfb0c093";
182 const gchar *client_nonce = "0a4f113b"; 182 const gchar *client_nonce = "0a4f113b";
183 const gchar *username = "Mufasa"; 183 const gchar *username = "Mufasa";
184 const gchar *realm = "testrealm@host.com"; 184 const gchar *realm = "testrealm@host.com";

mercurial