mirror of
https://github.com/dkmstr/openuds.git
synced 2025-03-20 06:50:23 +03:00
Refactor CryptoManager usage to use singleton instance for random string and encryption
This commit is contained in:
parent
92eee92b29
commit
3edabec51e
@ -417,8 +417,8 @@ class HTML5RDPTransport(transports.Transport):
|
||||
creds_info.domain,
|
||||
)
|
||||
|
||||
scrambler = CryptoManager().random_string(32)
|
||||
crypted_password = CryptoManager().symmetric_encrypt(password, scrambler)
|
||||
scrambler = CryptoManager.manager().random_string(32)
|
||||
crypted_password = CryptoManager.manager().symmetric_encrypt(password, scrambler)
|
||||
|
||||
def as_txt(txt: typing.Any) -> str:
|
||||
return 'true' if txt else 'false'
|
||||
|
Loading…
x
Reference in New Issue
Block a user