我该怎么办?解密或解压缩?蟒蛇 [英] What should I do first? Decrypt or Decompress? Python

查看:246
本文介绍了我该怎么办?解密或解压缩?蟒蛇的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



FileName ='comdty_option_namr.out.gz.enc

我正在尝试解密彭博数据文件,我知道是DES加密的。 '



做什么是正确的顺序:打开文件并解压缩然后解密,反之亦然?

解决方案

嗯,这一切都取决于文件的转换方式,有两种可能的方式(在你的情况下是#1):


  1. 首先创建zip,然后加密zip

  2. 首先加密该文件,然后将其压缩

文件的扩展名通过从左到右阅读来告诉您操作顺序:


  1. comdty_option_namr.out 是文件的名称

  2. 文件获得 gzipped ,从而达到 comdty_option_namr.out.gz

  3. 之后的 gzip 存档加密,导致文件 comdty_option_namr.out。 gz.enc


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?

解决方案

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

这篇关于我该怎么办?解密或解压缩?蟒蛇的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆