예제 #1
0
def create_salt_string():
    return binascii.hexlify(generate_bytes(int(CONSTANTS.SALT_LENGTH /
                                               2))).decode()
예제 #2
0
def create_token_string():
    return binascii.hexlify(
        generate_bytes(int(knox_settings.AUTH_TOKEN_CHARACTER_LENGTH /
                           2))).decode()