/soc/2013/ankitkv/gobjectification: debeae4131ca: Added get_bloc...
Ankit Vani
a at nevitus.org
Fri Jun 14 02:42:54 EDT 2013
Changeset: debeae4131cad9ff31a9ca3d7900d123859ab04d
Author: Ankit Vani <a at nevitus.org>
Date: 2013-06-14 12:12 +0530
Branch: soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/debeae4131ca
Description:
Added get_block_size to PurpleMD4Cipher
diffstat:
libpurple/ciphers/md4.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (43 lines):
diff --git a/libpurple/ciphers/md4.c b/libpurple/ciphers/md4.c
--- a/libpurple/ciphers/md4.c
+++ b/libpurple/ciphers/md4.c
@@ -19,7 +19,7 @@
#define MD4_DIGEST_SIZE 16
#define MD4_BLOCK_WORDS 16
-#define MD4_CIPHER_WORDS 4
+#define MD4_HASH_WORDS 4
#define PURPLE_MD4_CIPHER_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE((obj), PURPLE_TYPE_MD4_CIPHER, PurpleMD4CipherPrivate))
@@ -28,7 +28,7 @@
* Structs
*****************************************************************************/
typedef struct {
- guint32 hash[MD4_CIPHER_WORDS];
+ guint32 hash[MD4_HASH_WORDS];
guint32 block[MD4_BLOCK_WORDS];
guint64 byte_count;
} PurpleMD4CipherPrivate;
@@ -249,6 +249,13 @@ purple_md4_cipher_get_digest_size(Purple
return 16;
}
+static size_t
+purple_md4_cipher_get_block_size(PurpleCipher *cipher)
+{
+ /* This does not change (in this case) */
+ return 64;
+}
+
/******************************************************************************
* Object Stuff
*****************************************************************************/
@@ -265,6 +272,7 @@ purple_md4_cipher_class_init(PurpleMD4Ci
cipher_class->append = purple_md4_cipher_append;
cipher_class->digest = purple_md4_cipher_digest;
cipher_class->get_digest_size = purple_md4_cipher_get_digest_size;
+ cipher_class->get_block_size = purple_md4_cipher_get_block_size;
}
/******************************************************************************
More information about the Commits
mailing list