python加密解密

阅读: 评论:0

EncodeFile(python2.7 加密)
# -*- coding: utf8 -*-
import base64
超高压食品import sys
reload(sys)
sys.setdefaultencoding('utf8')
inFile=sys.argv[1]
try:
    fin = open(inFile, "rb")
    fout = open(inFile+".txt", "w")
    de(fin, fout)
丙烯酰胺水溶液聚合
    pass
混凝土防冻剂配方except Exception, e:
    print u"文件打开失败!".encode("GBK")
材料架finally:
    fin.close()
    fout.close()
    print u"编码成功!".encode("GBK")
    pass
DecodeFile(python2.7 解密)
# -*- coding: utf8 -*-
import base64
import sys
reload(sys)
sys.setdefaultencoding('utf8')
inFile=sys.argv[1]
try:
    fin = open(inFile, "rb")
    fout = place(".txt", ""), "wb")
    base64.decode(fin, fout)
    pass
except Exception, e:高效脱硫剂
    print u"文件打开失败!".encode("GBK")
节油剂finally:
    fin.close()
    fout.close()
    print u"解码成功!".encode("GBK")
    pass

本文发布于:2023-07-29 08:35:40,感谢您对本站的认可!

本文链接:https://patent.en369.cn/patent/4/196973.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:防冻剂   文件   聚合   配方   打开
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 369专利查询检索平台 豫ICP备2021025688号-20 网站地图