encrypt file and file type idenfication