private static void EncryptFileRawData(string filePath)
        {
            var settings           = MetadataAssetSettings.Load();
            var rawData            = File.ReadAllBytes(filePath);
            var dataEncryptionFlag = BitConverter.GetBytes(settings.DataEncryptionAndDecryption);

            using var writer = new BinaryWriter(new MemoryStream());
            // Write flag to judge if data need to decryption
            writer.Write(dataEncryptionFlag);

            if (settings.DataEncryptionAndDecryption)
            {
                // Write key and cipher data
                var key        = CryptoUtility.GenerateRandomKey(MetadataManager.EncryptionKeyLength);
                var cipherData = CryptoUtility.AesEncrypt(rawData, key);
                writer.Write(key);
                writer.Write(cipherData);
            }
            else
            {
                // Write raw data
                writer.Write(rawData);
            }

            var bufferData = ((MemoryStream)writer.BaseStream).GetBuffer();

            File.WriteAllBytes(filePath, bufferData);
        }