danikula / danikula/AndroidVideoCache
Media is encrypted but not working after cached.
- 主要语言
- Java
- 星标
- 5.5k
- 派生
- 1.2k
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi,
Following up on this [issue](https://github.com/danikula/AndroidVideoCache/issues/71#issuecomment-301775416)
I wrote the `Cipher` using `XOR` encryption as you said above, but i ran into problem where data is ciphered successfully and cached but not when i try to decipher the cached file.
private fun encryptOrDecrypt(input: ByteArray, key: String) {
for (i in input.indices) {
val o = input[i] xor '0'.toByte()
input[i] = o
}
}
and i aslo added the `CipherAwareCacheWrapper`
private HttpProxyCache newHttpProxyCache() throws ProxyCacheException {
HttpUrlSource source = new HttpUrlSource(url, config.sourceInfoStorage, config.headerInjector);
FileCache cache = new FileCache(config.generateCacheFile(url), config.diskUsage);
CipherAwareCacheWrapper cipherAwareCacheWrapper = new CipherAwareCacheWrapper(cache, config.cipher);
HttpProxyCache httpProxyCache = new HttpProxyCache(source, cipherAwareCacheWrapper);
httpProxyCache.registerCacheListener(uiCacheListener);
return httpProxyCache;
}
Can you please guide me on what I'm missing up?
Thanks in advance.
贡献指南
这个仓库没有索引到贡献指南
调研方向
从提供的 newHttpProxyCache() 入口点开始,检查 CipherAwareCacheWrapper 在写入和读取缓存数据时如何应用 Cipher。使用提供的 XOR 示例重现该故障;完成标准是加密媒体在缓存后仍可读取和播放。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- android, java, kotlin
- 领域
- cryptography, mobile-dev
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100