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

uni.BouncyCastle-JCA.3.0.1.source-code.SecureRandom.crysl Maven / Gradle / Ivy

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 {"DEFAULT", "NONCEANDIV"};
	
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 - 2025 Weber Informatics LLC | Privacy Policy