MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / algorithmFromString

Function algorithmFromString

launcher/modplatform/helpers/HashUtils.cpp:66–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66Algorithm algorithmFromString(QString type)
67{
68 if (type == "md4")
69 return Algorithm::Md4;
70 if (type == "md5")
71 return Algorithm::Md5;
72 if (type == "sha1")
73 return Algorithm::Sha1;
74 if (type == "sha256")
75 return Algorithm::Sha256;
76 if (type == "sha512")
77 return Algorithm::Sha512;
78 if (type == "murmur2")
79 return Algorithm::Murmur2;
80 return Algorithm::Unknown;
81}
82
83QString hash(QIODevice* device, Algorithm type)
84{

Callers 2

ResourceDownloadTaskMethod · 0.85
HasherMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected