gpt4 book ai didi

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

转载 作者:太空狗 更新时间:2023-10-29 13:46:36 27 4
gpt4 key购买 nike

我希望没有人可以复制我的应用程序的声音文件,因为它受版权保护。为此,我正在考虑将声音文件 (.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/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com