import random


def _make_random_sequence(length=50):
    """ Generate a random string for secret key or password """
    chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
    return ''.join(random.SystemRandom().choice(chars) for n in range(length))