Ejemplo n.º 1
0
    def box_get_passwd(self, box_layout):
        error = lambda: \
            self.animation_object(box_layout,
                                  color=
                                  list(self.animation_color["border"]),
                                  color_end=
                                  list(self.animation_color["error"]),
                                  font_color=
                                  list(self.animation_color["font"]),
                                  reverse=True)
        # showing or hide password
        account = self.db.get_account(box_layout.tbl, box_layout.id)
        passwd = rsa_decode(account[2], self.keys["private"])

        if not passwd:
            self.show_msg("Unable to retrieve your password")
            error()
            return
        self.animation_object(box_layout,
                              color=
                              list(self.animation_color["border"]),
                              color_end=
                              list(self.animation_color["light"]),
                              font_color=
                              list(self.animation_color["font"]),
                              font_end_color=
                              list(self.animation_color["font"]),
                              reverse=True)

        self.box_flag_change(box_layout, passwd, account[2])
Ejemplo n.º 2
0
    def box_get_passwd(self, box_layout):
        # showing or hide password
        account = self.db.get_account(box_layout.tbl, box_layout.id)
        passwd = rsa_decode(account[2], self.keys["private"])

        if not passwd:
            self.show_msg("Unable to retrieve your password")
            return

        self.box_flag_change(box_layout, passwd, account[2])