We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d8fb19 commit 4cb846dCopy full SHA for 4cb846d
tools/communityauth/generate_cryptkey.py
@@ -24,12 +24,13 @@ def usage():
24
usage()
25
26
version = int(sys.argv[1])
27
+ keylen = 64 if version == 3 else 32
28
- print("The next row contains a 64-byte (512-bit) symmetric crypto key.")
29
+ print("The next row contains a {}-byte ({}-bit) symmetric crypto key.".format(keylen, keylen * 8))
30
print("This key should be used to integrate a community auth site.")
31
print("Note that each site should have it's own key!!")
32
print("")
33
34
r = Random.new()
- key = r.read(64 if version == 3 else 32)
35
+ key = r.read(keylen)
36
print(base64.b64encode(key).decode('ascii'))
0 commit comments