python: Use secrets.token_bytes instead of random
commit23e61d2cebc999bfdd68628f2140bc81b6633132
authorAndreas Schneider <asn@samba.org>
Wed, 3 Apr 2024 08:54:41 +0000 (3 10:54 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 9 Apr 2024 22:52:37 +0000 (9 22:52 +0000)
tree3c704f196c8f8ff62413a84c769fd804d6411eed
parentdecacb0e7e11b347b1a3a8172250a51258295b7f
python: Use secrets.token_bytes instead of random

random should not be used to create secure random numbers for tokens.
The secrets module is exactly for this.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/lsa_utils.py