client/SecretStore.class.php
//generate a random string with len bytes 
generate a random string with len bytes
generate a random string with len bytes
protected static function randomStr($len)
	{
		if(self::$devRandHandle)
			$result=self::read(self::$devRandHandle, $len);
		else
		{
			$result="";
			for($i=0;$i<$len;$i++)
				$result.=chr(mt_rand(0, 255));
		}
		return $result;
	}
protected static function randomStr ( $ len ) { if ( self :: $ devRandHandle ) $ result = self :: read ( self :: $ devRandHandle , $ len ) ; else { $ result = " " ; for ( $ i = 0 ; $ i < $ len ; $ i ++ ) $ result .= chr ( mt_rand ( 0 , 255 ) ) ; } return $ result ; }
generate a random string with len bytes
generate a random string with len bytes
//try to read from /dev/random if applicable //mt_rand will just have to do