1. add dotfiles deploy via .tar.xz; 2. update .sway/config; 3. update test_crypto.py;
21 lines
545 B
Python
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',
|
|
),
|
|
)
|