This patch set adds pyCrypto to bandit's blacklist, so bandit will strongly advise against using pyCrypto. As mentioned in the bug, this may cause false positives if people use pyCrytodome, but will be tracked and addressed in follow up patch set. Depends-On: I0b1a90c3a47ad6d3b18597e5315e9f017854a146 Change-Id: I81f695cd31dee393ab4530dbcdb20dd925bbece2 Closes-Bug: #1655973
9 lines
206 B
Python
9 lines
206 B
Python
from Crypto.Cipher import AES
|
|
from Crypto import Random
|
|
|
|
|
|
def test_pycrypto():
|
|
key = b'Sixteen byte key'
|
|
iv = Random.new().read(AES.block_size)
|
|
cipher = pycrypto_arc2.new(key, AES.MODE_CFB, iv)
|