Raised This Month: $ Target: $400
 0% 

[ANY] MD5 Stocks for both files and strings.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
thomasjosif
AlliedModders Donor
Join Date: Mar 2016
Old 12-25-2017 , 13:06   [ANY] MD5 Stocks for both files and strings.
Reply With Quote #1

Couldn't find a way to get the MD5 hash of a file without extensions, so I did it myself. Someone could probably find it useful. (I'm using it to verify downloaded files.) It could be improved but was short on time.

Note: All I did was split up the MD5 function for it to be able to work with files.

Have fun.

PHP Code:
// Quick test of md5 functions.
#include <sourcemod>
#include <md5stocks>

public void OnPluginStart()
{
    
char path[PLATFORM_MAX_PATH];
    
char md5[512];
    
BuildPath(Path_SMpathsizeof(path), "/plugins/md5.smx");
    if(
MD5_File(pathmd5sizeof(md5)))
    {
        
PrintToServer("****** MD5 FILE ******");
        
PrintToServer(md5);
        
PrintToServer("****** MD5 FILE ******");
    }
    else
        
PrintToServer("**** FILE NOT FOUND ****");

include file
__________________
Systems Admin @ http://hellsgamers.com
thomasjosif is offline
 



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 22:39.


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