def encrypt_frames(arr,key_encrypt,iv_encrypt): cipher_text=np.array([])
cipher = AES.new(key_encrypt, AES.MODE_CBC,iv_encrypt)
cipher_text=cipher.encrypt(pad(arr,AES.block_size))
return(cipher_text)
def main(): video_file='thumb0001.jpg' image=cv2.imread(video_file) print("Image Shape",image.shape) vid_arr_bytes=np.array([1,720,1280,3]) vid_arr_bytes=image.tobytes() key=get_random_bytes(16) iv=get_random_bytes(16) input_for_decrypt=encrypt_frames(vid_arr_bytes,key,iv) img=cv2.imwrite('frame0.jpg',img) if __name__=="__main__": main()