freelance-project-34-market.../python/online/fxreader/pr34/tests/test_crypto.py
Siarhei Siniak ff786e3ce6 [+] update pr34
1. add dotfiles deploy via .tar.xz;
  2. update .sway/config;
  3. update test_crypto.py;
2025-03-04 15:44:20 +03:00

21 lines
545 B
Python

from online.fxreader.pr34.commands_typed import crypto
import unittest
class TestCrypto(unittest.TestCase):
def test_password_utils(self) -> None:
salt = b'asdfasdfasdf'
encrypt_res = crypto.PasswordUtils.encrypt(
'blah',
mode='bytes',
salt=salt,
)
self.assertEqual(
encrypt_res,
(
salt,
b'\xdak\xd15\xfa\x8e\xc8\r\xc3\xd2c\xf1m\xb0\xbf\xe6\x98\x01$!j\xc8\xc0Hh\x84\xea,\x91\x8b\x08\xce',
),
)