Skip to content

lib, doc: added key generator #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions key_generator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#-*-coding:utf8;-*-
#qpy:3
#qpy:console

'''
@Key Generator@

Comments:
Coming soon you can generating keys for you message!

Author: Ponochevnyi Nazar
'''

import random

output_file = 'key.txt' # name of the file in which the key is saved
length_key = 1000000 # required key length

alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "G", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] # you can change

result = ''.join([random.choice(alphabet) for _ in range(length_key)])

file = open(output_file, 'w')
file.write(result)
file.close()