Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
indicators-parser-saas
backend
Commits
0965aee7
Verified
Commit
0965aee7
authored
2 years ago
by
Власов Иван Юрьевич
Browse files
Options
Download
Patches
Plain Diff
Docstring added
parent
34d45e05
master
No related merge requests found
Pipeline
#98341
passed with stage
in 2 minutes and 50 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
auth/utils.py
+6
-1
auth/utils.py
with
6 additions
and
1 deletion
+6
-1
auth/utils.py
+
6
−
1
View file @
0965aee7
...
...
@@ -2,7 +2,12 @@ from jwcrypto.jwk import JWK
def
create_and_save_key
(
key_file_name
=
"key.jwk"
):
""" Generates new RSA key and stores it in file """
"""
Generates new RSA key and stores it in file
Args:
key_file_name (str): save path for jwk key
"""
key
=
JWK
.
generate
(
kty
=
"RSA"
,
size
=
2048
)
with
open
(
key_file_name
,
"w+"
)
as
f
:
f
.
write
(
key
.
export
())
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets