diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-09-08 08:17:19 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-09-08 08:17:19 +0000 |
commit | 2a2ab0cd013810f059cf378f3e88fc910952c7d5 (patch) | |
tree | 0e505f6d5d24f9bcb71047dc79583382e0e42c02 | |
parent | 6badcad3d326f555c46c25c00e5e64ea02154531 (diff) |
md5_hmac_get(): minor code cleanup.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@561 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ChangeLog.ja | 4 | ||||
-rw-r--r-- | libsylph/md5_hmac.c | 4 |
3 files changed, 9 insertions, 3 deletions
@@ -1,5 +1,9 @@ 2005-09-08 + * libsylph/md5_hmac.c: md5_hmac_get(): minor code cleanup. + +2005-09-08 + * libsylph/md5.[ch]: replaced with public domain code in GNet. * libsylph/md5_hmac.[ch]: separated from md5.[ch] and rewrote. * libsylph/pop.c diff --git a/ChangeLog.ja b/ChangeLog.ja index a6df95d9..cfca730b 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,5 +1,9 @@ 2005-09-08 + * libsylph/md5_hmac.c: md5_hmac_get(): 若干コードを整理。 + +2005-09-08 + * libsylph/md5.[ch]: GNet の public domain なコードで置き換えた。 * libsylph/md5_hmac.[ch]: md5.[ch] から分離して書き直した。 * libsylph/pop.c diff --git a/libsylph/md5_hmac.c b/libsylph/md5_hmac.c index 46c0f523..c9091f83 100644 --- a/libsylph/md5_hmac.c +++ b/libsylph/md5_hmac.c @@ -55,9 +55,7 @@ md5_hmac_get(const guchar *text, gint text_len, /* if key is longer than 64 bytes reset it to key=MD5(key) */ SMD5 *tmd5; - tmd5 = s_gnet_md5_new_incremental(); - s_gnet_md5_update(tmd5, key, key_len); - s_gnet_md5_final(tmd5); + tmd5 = s_gnet_md5_new(key, key_len); memcpy(k_ipad, s_gnet_md5_get_digest(tmd5), S_GNET_MD5_HASH_LENGTH); memcpy(k_opad, s_gnet_md5_get_digest(tmd5), |