import random
import string


def crypto_string(self, size):
    """
    Securely generate a random string of a specified length
    Can include uppercase or lowercase ASCII characters and/or integers

    :param int size: desired length of string

    :returns: str
    """
    # http://stackoverflow.com/a/23728630/1993468
    return ''.join(random.SystemRandom().choice(
        string.ascii_letters + string.digits) for _ in range(size))