Use getpass instead of input function for password
This commit is contained in:
@@ -4,6 +4,7 @@ from Crypto.Cipher import AES
|
||||
from Crypto.Util import Padding
|
||||
from Crypto.Hash import HMAC, SHA256
|
||||
import sys
|
||||
from getpass import getpass
|
||||
IV_LENGTH = 16
|
||||
NONCE_LENGTH = 16
|
||||
MAC_LENGTH = 16
|
||||
@@ -29,7 +30,7 @@ def generate_key(password):
|
||||
return m.digest()
|
||||
|
||||
def main():
|
||||
password = input('Password: ')
|
||||
password = getpass()
|
||||
key = generate_key(password.encode('utf-8'))
|
||||
|
||||
# generate string to be pasted in Signal-Desktop
|
||||
|
||||
Reference in New Issue
Block a user