Exemple #1
0
    def get_text_strength(self, password):
        strength = gecolib.strength(password)

        text_strength = ('Mala', 'Buena', 'Fuerte', 'Perfecta')
        index = int(strength * (len(text_strength)-1))
        text_strength = text_strength[index]
        return text_strength
Exemple #2
0
 def strength(self, password):
     bar = self.builder.get_object('strength')
     strength = gecolib.strength(password)
     text_strength = self.get_text_strength(password)
     bar.set_text(text_strength)
     bar.set_fraction(strength)