All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tu.crossing.JavaCryptographicArchitecture.3.1.2.source-code.SecureRandom.crysl Maven / Gradle / Ivy

The newest version!
SPEC java.security.SecureRandom

OBJECTS 
	byte[] seed;
	byte[] genSeed;
	java.lang.String algorithm;
	long lSeed;
	byte[] bytes;
	int randInt;
	int randIntInRange;
	int range;
	
EVENTS
	c1: SecureRandom();
	c2: SecureRandom(seed);
	Con := c1 | c2;
	
	g1: getInstance(algorithm);
	g2: getInstance(algorithm, _);
	gI: getInstanceStrong();
	Get := g1 | g2 | gI;
	
	Ins := Get | Con;

	s1: setSeed(seed);
	s2: setSeed(lSeed);
	Seed := s1 | s2;

	gS: genSeed = generateSeed(_);	

	nB: nextBytes(bytes);
	nI: randInt = nextInt();
	nIR: randIntInRange = nextInt(range);
	Next := nB | nI | nIR;
	
	End := gS | Next;

ORDER
	Ins, (Seed?, End*)*
 	
CONSTRAINTS
	algorithm in {"SHA1PRNG", "Windows-PRNG", "NativePRNG", "NativePRNGBlocking", "NativePRNGNonBlocking", "PKCS11"};
	
REQUIRES	
	randomized[seed];
	randomized[lSeed];
	
ENSURES
	randomized[this] after Ins;
	randomized[genSeed] after gS;
	randomized[bytes] after nB;
	randomized[randInt] after nI;
	randomized[randIntInRange] after nIR;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy