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