Ejemplo n.º 1
0
    static void EncryptAssetBundle()
    {
        string path = Application.streamingAssetsPath + "/" + EditorUserBuildSettings.activeBuildTarget + "/ab_bundle1";

        AES.AESFileEncrypt(path, SECRET_KEY);
        AssetDatabase.Refresh();
    }
Ejemplo n.º 2
0
    public static void EncryptAB()
    {
        DirectoryInfo directory = new DirectoryInfo(m_BunleTargetPath);

        FileInfo[] files = directory.GetFiles("*", SearchOption.AllDirectories);
        for (int i = 0; i < files.Length; i++)
        {
            if (!files[i].Name.EndsWith("meta") && !files[i].Name.EndsWith(".manifest"))
            {
                AES.AESFileEncrypt(files[i].FullName, "Ocean");
            }
        }
        Debug.Log("加密完成!");
    }
Ejemplo n.º 3
0
 static void EncryptNormalAssetBundle()
 {
     if (ab_pathList.Count > 1)
     {
         for (int i = 0; i < ab_pathList.Count; i++)
         {
             AES.AESFileEncrypt(ab_pathList[i], SECRET_KEY);
         }
     }
     else
     {
         Debug.LogError("没有需要加密的AB包!");
     }
 }
    public static void EncryptAssetBundle()
    {
        DirectoryInfo dirInfo = new DirectoryInfo(m_BuildABPath);

        FileInfo[] files = dirInfo.GetFiles("*", SearchOption.AllDirectories);
        foreach (var item in files)
        {
            if (item.FullName.EndsWith(".meta") && item.FullName.EndsWith(".manifest"))
            {
                continue;
            }
            AES.AESFileEncrypt(item.FullName, "xiaohailin");
        }
        Debug.Log("加密完成");
    }
Ejemplo n.º 5
0
 public static void TestEnc()
 {
     AES.AESFileEncrypt(Application.dataPath + "/GameData/Data/Xml/TestData.xml", "Ocean");
 }
    public static void TestEncrypt()
    {
        string filePath = Application.dataPath + "/TestEncrypt.xml";

        AES.AESFileEncrypt(filePath, "XHL");
    }