Raised This Month: $32 Target: $400
 8% 

[EXTENSION] MD5Lib


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DieTeetasse
Senior Member
Join Date: Jul 2009
Old 12-21-2010 , 12:26   [EXTENSION] MD5Lib
Reply With Quote #1

A small sourcemod extension, that will add 2 new functions to sourcepawn for creating md5 hashes of strings and files.

PHP Code:
/**
 * @brief Creates md5hash for given file name
 * @remarks throws an error if file not found
 * 
 * @param filename     file to hash
 * @param buffer    buffer to safe md5 hash (optimal size 33 [32chars + \0])
 * @param maxlen    maxlength of buffer
 * @return             none
 */
native MD5File(const String:filename[], String:buffer[], maxlen);

/**
 * @brief Creates md5hash for given string
 * @remarks
 * 
 * @param filename     string to hash
 * @param buffer    buffer to safe md5 hash (optimal size 33 [32chars + \0])
 * @param maxlen    maxlength of buffer
 * @return             none
 */
native MD5String(const String:string[], String:buffer[], maxlen); 
Source repository:
https://bitbucket.org/DieTeetasse/sm...d5lib/overview

Download:
https://bitbucket.org/DieTeetasse/sm...xts_md5lib.zip
__________________
DieTeetasse is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 12-21-2010 , 23:04   Re: [EXTENSION] MD5Lib
Reply With Quote #2

Here's an implementation in sourcepawn: http://forums.alliedmods.net/showthread.php?t=67683
__________________
pheadxdll is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 12-23-2010 , 02:09   Re: [EXTENSION] MD5Lib
Reply With Quote #3

But this is faster because compiled (not JIT).
__________________
FaTony is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 12-24-2010 , 07:49   Re: [EXTENSION] MD5Lib
Reply With Quote #4

Quote:
Originally Posted by FaTony View Post
But this is faster because compiled (not JIT).
+ is able to work with files.
__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode