【发布时间】:2016-05-14 23:14:36
【问题描述】:
我正在做 AES 加密,并希望使用静态密钥。
在 C 中我会做 -
无符号字符键[16] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
我如何在 python 中做到这一点?
另外,如果我想查看 Crypto.cipher 中的 AES 类的类/代码,我在哪里可以找到它?
我正在使用python2.7
【问题讨论】:
-
你可以看看这个SO answer
-
关于第二个问题,here's PyCrypto source on Github
-
key = bytearray(16) -
也可以考虑
numpy。key = numpy.empty([16], dtype=uint8)
标签: python