the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#include "stdafx.h"
2#include <xhash>
3
4#include "Hasher.h"
5
6Hasher::Hasher(wstring &salt)
7{
8 this->salt = salt;
9}
10
11wstring Hasher::getHash(wstring &name)
12{
13 // 4J Stu - Removed try/catch
14 //try {
15 wstring s = wstring( salt ).append( name );
16 //MessageDigest m;
17 //m = MessageDigest.getInstance("MD5");
18 //m.update(s.getBytes(), 0, s.length());
19 //return new BigInteger(1, m.digest()).toString(16);
20
21 // TODO 4J Stu - Will this hash us with the same distribution as the MD5?
22 return _toString(std::hash<wstring>{}( s ) );
23 //}
24 //catch (NoSuchAlgorithmException e)
25 //{
26 // throw new RuntimeException(e);
27 //}
28}