danikula / danikula/AndroidVideoCache

Media is encrypted but not working after cached.

Ouverte
#229 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Java
Étoiles
5.5k
Forks
1.2k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Start at the supplied newHttpProxyCache() entry point and inspect how CipherAwareCacheWrapper applies the Cipher while writing and reading cached data. Reproduce the failure with the provided XOR example; done means encrypted media remains readable and playable after it has been cached.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
android, java, kotlin
Domaine
cryptography, mobile-dev
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.