mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
14 lines
309 B
Python
14 lines
309 B
Python
# snippet from python/ql/test/experimental/library-tests/frameworks/cryptodome/test_rc4.py
|
|
from Cryptodome.Cipher import ARC4
|
|
|
|
import os
|
|
|
|
key = os.urandom(256//8)
|
|
|
|
secret_message = b"secret message"
|
|
|
|
cipher = ARC4.new(key)
|
|
encrypted = cipher.encrypt(secret_message) # NOT OK
|
|
|
|
print(secret_message, encrypted)
|