When creating a simple executable (Windows) with pyinstaller, my py script can be compiled, but when starting it, it fails with:
Traceback (most recent call last): File “salsatest.py”, line 1, in File “PyInstallerloaderpyimod02_importers.py”, line 419, in exec_module File “salsa20.py”, line 18, in File “imp.py”, line 297, in find_module ImportError: No module named ‘_salsa20’ [3400] Failed to execute script ‘salsatest’ due to unhandled exception!
Here is the simple python script salsatest.py
from salsa20 import XSalsa20_xor
from os import urandom
IV = urandom(24)
KEY = b'secretsecretsecretsecretsecretsecret'
ciphertext = XSalsa20_xor(b"IT'S A YELLOW SUBMARINE", IV, KEY[0:32])
print(ciphertext)
print(XSalsa20_xor(ciphertext, IV, KEY[0:32]).decode())
I am using pyinstaller version 6.6.0 and python Python 3.11.9
The salsa library was installed before with
pip install salsa20
Dirk Lerch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.