I am working on an app which needs encryption of video files which is working quite well.But the method I am using to decrypt returns the video as in Byte array. So is there anyway that I can play the video using that array without creating a new file.
My method decryption:
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 I am stuck here ?