BinaryWorks.it Official Forum
BinaryWorks.it Official Forum
Home | Profile | Active Topics | Members | Search | FAQ
 All Forums
 eXtreme Movie Manager (Rel. 7), No More Updates
 Suggestions / New Features
 MD4 Calculation

Note: You must be registered in order to post a reply.

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
spudthedestroyer Posted - 29 Jul 2004 : 10:09:55
I may have requested this before, but I was wondering if it was possible to include MD4 hash calculation? I use emule most of the time and that uses the format:
ed2k://|file|FILENAME|FILESIZEBYTES|MD4HASHHERE|/

There are some open source programs on emule-project.net in C code on hashing ed2k links under downloads.

I think this is the MD4 hashing part:
class CAddFileThread : public CWinThread
{
	DECLARE_DYNCREATE(CAddFileThread)
protected:
	CAddFileThread();
public:
	virtual BOOL InitInstance();
	virtual int	Run();
	void	SetValues(LPCTSTR directory, LPCTSTR filename);

private:
	CString			 m_strDirectory;
	CString			 m_strFilename;
};


// constants for MD4Transform
#define S11 3
#define S12 7
#define S13 11
#define S14 19
#define S21 3
#define S22 5
#define S23 9
#define S24 13
#define S31 3
#define S32 9
#define S33 11
#define S34 15

// basic MD4 functions
#define MD4_F(x, y, z) (((x) & (y)) | ((~x) & (z)))
#define MD4_G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z)))
#define MD4_H(x, y, z) ((x) ^ (y) ^ (z))

// rotates x left n bits
// 15-April-2003 Sony: use MSVC intrinsic to save a few cycles
#ifdef _MSC_VER
#pragma intrinsic(_rotl)
#define MD4_ROTATE_LEFT(x, n) _rotl((x), (n))
#else
#define MD4_ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
#endif

// partial transformations
#define MD4_FF(a, b, c, d, x, s) \
{ \
  (a) += MD4_F((b), (c), (d)) + (x); \
  (a) = MD4_ROTATE_LEFT((a), (s)); \
}

#define MD4_GG(a, b, c, d, x, s) \
{ \
  (a) += MD4_G((b), (c), (d)) + (x) + (uint32)0x5A827999; \
  (a) = MD4_ROTATE_LEFT((a), (s)); \
}

#define MD4_HH(a, b, c, d, x, s) \
{ \
  (a) += MD4_H((b), (c), (d)) + (x) + (uint32)0x6ED9EBA1; \
  (a) = MD4_ROTATE_LEFT((a), (s)); \
}

static void MD4Transform(uint32 Hash[4], uint32 x[16]);
3   L A T E S T    R E P L I E S    (Newest First)
spudthedestroyer Posted - 17 Jan 2005 : 00:50:11
well I would be forever indebted to you if your able to do it! It would be almost perfect with that feature!
Alessio Viti Posted - 11 Jan 2005 : 19:55:36
Hi!

I really don't know if I can add it. Inside XMM there is the MD5 hash now. I will take a look.

Alessio
spudthedestroyer Posted - 11 Jan 2005 : 17:21:54
Just wondering if this would be possible at all. ATM, I'm using Ed2k HASH Gui v0.3 to do this manually when archiving, so it would really speed things up

BinaryWorks.it Official Forum © Binaryworks.it Go To Top Of Page
Generated in 0.09 sec. Powered By: Snitz Forums 2000 Version 3.4.07