AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Extensions (https://forums.alliedmods.net/forumdisplay.php?f=134)
-   -   [EXTENSION] MD5Lib (https://forums.alliedmods.net/showthread.php?t=145883)

DieTeetasse 12-21-2010 12:26

[EXTENSION] MD5Lib
 
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

pheadxdll 12-21-2010 23:04

Re: [EXTENSION] MD5Lib
 
Here's an implementation in sourcepawn: http://forums.alliedmods.net/showthread.php?t=67683

FaTony 12-23-2010 02:09

Re: [EXTENSION] MD5Lib
 
But this is faster because compiled (not JIT).

exvel 12-24-2010 07:49

Re: [EXTENSION] MD5Lib
 
Quote:

Originally Posted by FaTony (Post 1377203)
But this is faster because compiled (not JIT).

+ is able to work with files. :)


All times are GMT -4. The time now is 17:55.

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