diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-09-08 08:00:07 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-09-08 08:00:07 +0000 |
commit | 204da8e8b7cb2454bf714085fb450bdada726d2e (patch) | |
tree | 241ce33bb5e28ae4bd1613b560919ba205ab5d64 /libsylph/pop.c | |
parent | 498f88096131e56df008c571ddc138bd48a50673 (diff) |
replaced md5.[ch] with public domain code in GNet.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@559 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/pop.c')
-rw-r--r-- | libsylph/pop.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libsylph/pop.c b/libsylph/pop.c index 3a562054..d9a640b6 100644 --- a/libsylph/pop.c +++ b/libsylph/pop.c @@ -138,7 +138,8 @@ static gint pop3_getauth_apop_send(Pop3Session *session) { gchar *start, *end; gchar *apop_str; - gchar md5sum[33]; + SMD5 *md5; + gchar *md5sum; g_return_val_if_fail(session->user != NULL, -1); g_return_val_if_fail(session->pass != NULL, -1); @@ -161,11 +162,15 @@ static gint pop3_getauth_apop_send(Pop3Session *session) *(end + 1) = '\0'; apop_str = g_strconcat(start, session->pass, NULL); - md5_hex_digest(md5sum, apop_str); - g_free(apop_str); + md5 = s_gnet_md5_new((guchar *)apop_str, strlen(apop_str)); + md5sum = s_gnet_md5_get_string(md5); pop3_gen_send(session, "APOP %s %s", session->user, md5sum); + g_free(md5sum); + s_gnet_md5_delete(md5); + g_free(apop_str); + return PS_SUCCESS; } |