Esempio n. 1
0
def generate_key():
    real_name = input("Please enter your real name: ")
    nickname = input("Please enter your nickname: ")
    email = input("Please enter your email address: ")
    passphrase = input("Please enter a passphrase for your key: ")
    print ("App will now hang. Please provide entropy.")
    gpglib.generate_gpg_key(real_name, nickname, email, passphrase)
    print ("Key generation complete")
Esempio n. 2
0
 def generateKeyClicked(self):
     realName = self.ui.nameTextEdit.toPlainText()
     if len(realName) == 0:
         self.showMessage("Please enter your name")
     nickname = self.ui.nicknameTextEdit.toPlainText()
     email = self.ui.emailTextEdit.toPlainText()
     if len(email) == 0:
         self.showMessage("Please enter your email address")
     passphrase = self.ui.passphraseLineEdit.text()
     if len(passphrase) == 0:
         self.showMessage("Please enter a passphrase")
     if passphrase != self.ui.repeatPassphraseLineEdit.text():
         self.showMessage("Passphrases do not match. Please try again")
     self.showMessage("When this message is dismissed app will hang. Please provide entropy.")
     print ("App will now hang. Please provide entropy.")
     generate_gpg_key(realName, nickname, email, passphrase) 
     print ("Complete")
     self.showMessage("Key generated")
     self.startKeySelector()