'Checks that the nonce only contains only safe characters
and is no shorter than lower and no longer than upper.'

def check_nonce(self, nonce):

    (lower, upper) = self.nonce_length
    return ((set(nonce) <= self.safe_characters) and (lower <= len(nonce) <= upper))
