Sto lavorando su un'app che richiede la crittografia dei file video che funziona abbastanza bene. Ma il metodo che sto usando per decrittografare restituisce il video come nella matrice Byte. Quindi c'è comunque che posso riprodurre il video usando quell'array senza creare un nuovo file.Come riprodurre un video dalla matrice Byte?
Il mio metodo di decrittazione:
private static byte[] decrypt(byte[] raw, byte[] encrypted) throws EncrypterException {
SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
try {
final Cipher cipher = Cipher.getInstance("AES");
cipher.init(Cipher.DECRYPT_MODE, skeySpec);
return cipher.doFinal(encrypted);
} catch (Exception e) {
throw new EncrypterException(e);
}
}
Please help me io sono bloccato qui?
ok ma come dovrei usare ByteArrayInputStream con VideoView? – Navdroid
@Navdroid: A ByteArrayInputStream è un InputStream. –
Ma io voglio usarlo VideoView .. Come posso usarlo senza creare un nuovo file – Navdroid