Exemple #1
0
 def __init__(self,
              alphabet=None,
              key=None,
              plain_text=None,
              cipher_text=None):
     """ """
     Cryptobox.__init__(self, alphabet, key, plain_text, cipher_text)
     self.key_init = 0
Exemple #2
0
    def bruteforce(self, times=None, alphabet=None, input_text=None):
        """
        times should be lower than len(input_text)
        """
        # initialise times to maximum possible value
        if times == None:
            times = len(input_text) - 1

        return Cryptobox.bruteforce(self, times, alphabet, input_text)
Exemple #3
0
    def bruteforce(self, times=None, alphabet=None, input_text=None):
        """
        times should be lower than len(input_text)
        """
        # initialise times to maximum possible value
        if times == None:
            times = len(input_text) - 1

        return Cryptobox.bruteforce(self, times, alphabet, input_text)
Exemple #4
0
    def bruteforce(self, times=None, alphabet=None, input_text=None):
        """ """
        # initialise times to alphabet length if not specified
        if times == None:
            if alphabet == None:
                times = self.alphabet.length
            else:
                times = alphabet.length

        return Cryptobox.bruteforce(self, times, alphabet, input_text)
Exemple #5
0
    def bruteforce(self, times=None, alphabet=None, input_text=None):
        """ """
        # initialise times to alphabet length if not specified
        if times == None:
            if alphabet == None:
                times = self.alphabet.length
            else:
                times = alphabet.length

        return Cryptobox.bruteforce(self, times, alphabet, input_text)
Exemple #6
0
 def decipher(self, alphabet=None, key=None, input_text=None):
     """ """
     return Cryptobox.decipher(self, alphabet, key, input_text)
Exemple #7
0
 def __init__(self, alphabet=None, key=None, plain_text=None,
              cipher_text=None):
     """ """
     Cryptobox.__init__(self, alphabet, key, plain_text, cipher_text)
     self.key_init = 'A'
Exemple #8
0
 def bruteforce(self, times, alphabet=None, input_text=None):
     """
     times could be up to any string as long as the message,
     it has no default value, it would be too long"""
     return Cryptobox.bruteforce(self, times, alphabet, input_text)
Exemple #9
0
 def decipher(self, alphabet=None, key=None, input_text=None):
     """ """
     return Cryptobox.decipher(self, alphabet, key, input_text)