def create_salt_string(): return ( binascii.hexlify( generate_bytes( int(CONSTANTS.SALT_LENGTH/2) ) ).decode())
def create_token_string(): return ( binascii.hexlify( generate_bytes( int(knox_settings.AUTH_TOKEN_CHARACTER_LENGTH/2) ) ).decode())
def create(self): token = None while True: token = binascii.hexlify(generate_bytes(self.TOKEN_NUM_BYTES)) if not self.filter(token=token).exists(): break return super().create(token=token)
def create_salt_string(): return (binascii.hexlify( generate_bytes(int(oneauth_settings.SALT_LENGTH / 2))).decode())
def create_token_string(): return (binascii.hexlify( generate_bytes(int(oneauth_settings.AUTH_TOKEN_CHARACTER_LENGTH / 2))).decode())
def create_salt_string(): return (binascii.hexlify(generate_bytes(int(CONSTANTS.SALT_LENGTH / 2))).decode())