What should I do first? Decrypt or Decompress? Python

你说的曾经没有我的故事 提交于 2019-12-12 01:22:46

问题


I'm trying to decrypt Bloomberg data files that I know are DES encrypted.

FileName = 'comdty_option_namr.out.gz.enc'

What is the right order to do things: Open the file and decompress and then decrypt or vice-versa?


回答1:


Well, it all depends on the way the file was transformed, and there are two possible ways (in your case is #1):

  1. first create the zip, then encrypt the zip
  2. first encrypt the file, then zip it

The extension of the file tells you the order of operations, by reading them from left to right:

  1. comdty_option_namr.out is the name of the file
  2. the file got gzipped, thus getting to comdty_option_namr.out.gz
  3. after which the gzip archive to encrypted, resulting the file comdty_option_namr.out.gz.enc


来源:https://stackoverflow.com/questions/29741887/what-should-i-do-first-decrypt-or-decompress-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!