Beispiel #1
0
    internal static Int64 GetPathId(string guid, Int64 fileId)
    {
        var input = new List <byte>();

        input.AddRange(Encoding.ASCII.GetBytes(guid));
        input.AddRange(BitConverter.GetBytes((Int32)3));
        input.AddRange(BitConverter.GetBytes(fileId));

        var output = Md4.Md4Hash(input);

        return(BitConverter.ToInt64(output.Take(8).ToArray(), 0));
    }
Beispiel #2
0
 internal static string GetCabFilename(string assetBundleName)
 => "CAB-" + StringFromByteArray(Md4.Md4Hash(new List <byte>(Encoding.ASCII.GetBytes(assetBundleName)))).ToLower();