Is xoshiro128** pseudorandom number generator reversible?

Advertisements This answer mentions the xoshiro128** algorithm and provides a JavaScript implementation. Question: Is it possible to derive the seed if you know the first random number produced by this generator? >Solution : No, it’s not possible to derive a seed given a single value. There is also no guarantee that you can derive a… Read More Is xoshiro128** pseudorandom number generator reversible?

nested strings for random.choice python

Advertisements I have 4 lists and want to choose a random list and then choose a random item of it. this is my code but it doesn’t work properly. can you help please? import random w=[‘*’, ‘&’ ,’^’, ‘%’ ,’$’ ,’#’, ‘@’ ,’!’] w1=[‘w’,’a’,’s’,’r’,’i’,’t’,’e’,’n’,’d’,’c’] w2=[‘W’,’A’,’S’,’R’,’I’,’T’,’E’,’N’,’D’,’C’,] w3=[‘1′,’2’] p=” j=8 while j: e=random.choice([‘w’,’w1′,’w2′,’w3′]) q=random.choice(f'{f"{e}"}’) p+=q j-=1 print(p)… Read More nested strings for random.choice python

How can I generate cryptographically strong random strings with a given length

Advertisements I need to generate cryptographically strong random alphanumeric strings with a specified length, only using the following characters. A-Z a-z 0-9 Is there a way to accomplish this in C#? >Solution : You can use class RandomNumberGenerator to generate cryptographically-secure random numbers to do this, for example: string allowed = "ABCDEFGHIJKLMONOPQRSTUVWXYZabcdefghijklmonopqrstuvwxyz0123456789"; int strlen =… Read More How can I generate cryptographically strong random strings with a given length

Trying to exclude an elements in an array if it overlaps with another array in Python

Advertisements I am writing code that pseudorandomises positions from an array: centre_pos = [‘A’,’B’,’C’,’D’,’E’] corner_pos = [‘1′,’2′,’3′,’4’] def position_generator(): #for centre, corner in zip(centre_pos, corner_pos): random_centre = random.choice(centre_pos) random_corner = random.choice(corner_pos) #if random_centre and random_corner in exclusion: #else: return random_centre, random_corner However, I want to exclude certain combinations of centre_pos and corner_pos. For example if… Read More Trying to exclude an elements in an array if it overlaps with another array in Python