Logo
Explore Help
Register Sign In
fengqi/lv_micropython
1
0
Fork 0
You've already forked lv_micropython
Code Issues Pull Requests 1 Actions Packages Projects Releases Wiki Activity
lv_micropython/tests/extmod/cryptolib_aes128_ecb.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
328 B
Python
Raw Normal View History

tests/extmod/ucryptolib*: Add tests for ucryptolib module.
2018-01-07 15:14:36 +02:00
try:
from Crypto.Cipher import AES
tests: Format all Python code with black, except tests in basics subdir. This adds the Python files in the tests/ directory to be formatted with ./tools/codeformat.py. The basics/ subdirectory is excluded for now so we aren't changing too much at once. In a few places `# fmt: off`/`# fmt: on` was used where the code had special formatting for readability or where the test was actually testing the specific formatting.
2020-03-22 21:26:08 -05:00
tests/extmod/ucryptolib*: Add tests for ucryptolib module.
2018-01-07 15:14:36 +02:00
aes = AES.new
except ImportError:
try:
tests: Replace umodule with module everywhere. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-08-18 16:57:45 +10:00
from cryptolib import aes
tests/extmod/ucryptolib*: Add tests for ucryptolib module.
2018-01-07 15:14:36 +02:00
except ImportError:
print("SKIP")
raise SystemExit
crypto = aes(b"1234" * 4, 1)
enc = crypto.encrypt(bytes(range(32)))
print(enc)
crypto = aes(b"1234" * 4, 1)
print(crypto.decrypt(enc))
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 146ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API