android - 如何在 Android 中存储和提取 WIND (.and) 文件中的数据

标签 android

我希望没有人可以复制我的应用程序的声音文件,因为它受版权保护。为此,我正在考虑将声音文件 (.ogg) 存储在 wind 文件中并在运行时提取声音文件。

我们如何做到这一点?

谢谢

最佳答案

我不是 100% 确定 WIND 文件是用于音频存储的安全文件类型,所以我基于一个理论:在我早期,我使用 FFT(快速傅里叶变换)来制作音频数据的频谱和这些函数被称为“WIND”类型。

这里有一个例子:https://github.com/bewantbe/audio-analyzer-for-android/blob/master/audioSpectrumAnalyzer/src/main/java/github/bewantbe/audio_analyzer_for_android/STFT.java

     (...line 74 ...)
     private void initWindowFunction(int fftlen, String wndName) {
         wnd = new double[fftlen];
         switch (wndName) {
             case "Bartlett":
                 for (int i=0; i<wnd.length; i++) {  // Bartlett
                     wnd[i] = asin(sin(PI*i/wnd.length))/PI*2;
                 }
                 break;
             case "Hanning":

如果存储了这些数据,它可能是某种“风文件”。早期版本的 TM Soft“白噪声”将文件保存为 WND:https://www.tmsoft.com/white-noise/

现在解决安全存储文件的问题。
Google 声明您应该使用文件系统加密:https://developer.android.com/training/articles/security-tips

To provide additional protection for sensitive data, you can encrypt local files using a key that is not directly accessible to the application. For example, you can place a key in a KeyStore and protect it with a user password that is not stored on the device. While this does not protect data from a root compromise that can monitor the user inputting the password, it can provide protection for a lost device without file system encryption.

我建议您使用以下方法在您的应用程序中加密然后解密:https://code.tutsplus.com/tutorials/storing-data-securely-on-android--cms-30558

通过加密您的文件,您的文件将是安全的,即使设备已获得 root 权限也是如此。

关于android - 如何在 Android 中存储和提取 WIND (.and) 文件中的数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53000023/

相关文章:

android - Tango 自更新后未保存网格或 adfs

java - HttpURLConnection 中的内容长度

android - 在 ListView 中创建类别?

android - ACTION_MEDIA_BUTTON 在真实设备上不起作用

android - Xamarin Android Player 显示 0 个可下载设备?

Android Kotlin 如何在多选 ListView 中选中复选框

java - 一旦定义了另一个类的 ArrayList,如何从它获取值?

java - 没有警告的 Gradle Javadoc 任务

c# - Xamarin IntentService 由 HardwareButton 启动

android - 提取联系人的照片