1234
This commit is contained in:
30
test.py
Normal file
30
test.py
Normal file
@@ -0,0 +1,30 @@
|
||||
import bcrypt
|
||||
|
||||
def hash_password(password):
|
||||
salt = bcrypt.gensalt()
|
||||
hashed_password = bcrypt.hashpw(password.encode('utf-8'), salt)
|
||||
return hashed_password
|
||||
def hesh():
|
||||
while True:
|
||||
password = input("Введите пароль для хеширования: ")
|
||||
hashed_password = hash_password(password)
|
||||
print(f"Хешированный пароль: {hashed_password.decode('utf-8')}")
|
||||
|
||||
import json
|
||||
import itertools
|
||||
|
||||
hesh()
|
||||
|
||||
## Генерация всех возможных комбинаций чисел от 1 до 18
|
||||
#combinations = list(itertools.permutations(range(1, 19)))
|
||||
#
|
||||
## Чтение существующего файла JSON
|
||||
#with open('/home/jze9/Desktop/git-lab/copp/app/assets/test.json', 'r', encoding='utf-8') as file:
|
||||
# data = json.load(file)
|
||||
#
|
||||
## Запись комбинаций в категорию Category
|
||||
#data['Category'] = combinations
|
||||
#
|
||||
## Запись обновленного содержимого обратно в файл JSON
|
||||
#with open('/home/jze9/Desktop/git-lab/copp/app/assets/test.json', 'w', encoding='utf-8') as file:
|
||||
# json.dump(data, file, ensure_ascii=False, indent=4)
|
||||
Reference in New Issue
Block a user