Get a random password.<p>
@param countTotal Desired password length
@param countCapitals minimal count of Capital letters
@param countSpecials count of special chars

@return random password
485276
public static String getRandomPWD(int countTotal, int countCapitals, int countSpecials) {

        CmsDefaultPasswordGenerator generator = new CmsDefaultPasswordGenerator();
        return generator.getRandomPassword(countTotal, countCapitals, countSpecials);
    }
616766
public ScanParams count(final Integer count) {
    params.put(COUNT, ByteBuffer.wrap(Protocol.toByteArray(count)));
    return this;
  }
613096
private void verifyPasswordStrength() {
        if (isEnabled() && !constraints.isEmpty() && !TextUtils.isEmpty(getText())) {
            float score = getPasswordStrength();
            adaptHelperText(score);
        } else {
            setHelperText(regularHelperText);
        }
    }
1246818
public final void mCOUNT() throws RecognitionException {
		try {
			int _type = COUNT;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// hql.g:17:7: ( 'count' )
			// hql.g:17:9: 'count'
			{
			match("count"); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
800831
private function getRandomBytes($count) {
		$bytes = '';

		if(function_exists('openssl_random_pseudo_bytes') &&
				(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN')) { // OpenSSL slow on Win
			$bytes = openssl_random_pseudo_bytes($count);
		}

		if($bytes === '' && is_readable('/dev/urandom') &&
				($hRand = @fopen('/dev/urandom', 'rb')) !== FALSE) {
			$bytes = fread($hRand, $count);
			fclose($hRand);
		}

		if(strlen($bytes) < $count) {
			$bytes = '';

			if($this->randomState === null) {
				$this->randomState = microtime();
				if(function_exists('getmypid')) {
					$this->randomState .= getmypid();
				}
			}

			for($i = 0; $i < $count; $i += 16) {
				$this->randomState = md5(microtime() . $this->randomState);

				if (PHP_VERSION >= '5') {
					$bytes .= md5($this->randomState, true);
				} else {
					$bytes .= pack('H*', md5($this->randomState));
				}
			}

			$bytes = substr($bytes, 0, $count);
		}

		return $bytes;
	}
300143
public static Matcher<PrintableResult> failureCountIs(final int count) {
        return new TypeSafeMatcher<PrintableResult>() {
            public void describeTo(Description description) {
                description.appendText("has " + count + " failures");
            }

            @Override
            public boolean matchesSafely(PrintableResult item) {
                return item.failureCount() == count;
            }
        };
    }
19147
public static int getBoundedNumber(Random random, int inclusiveLowerBound,
            int exclusiveUpperBound) {
        return random.nextInt(exclusiveUpperBound - inclusiveLowerBound) +
                inclusiveLowerBound;
    }
777230
public static function encryptOpenssl($textToEncrypt, string $secretHash = null, string $password = ''): ? string
  {
    if ( !$secretHash ){
      $secretHash = self::$salt;
    }
    if ( $length = openssl_cipher_iv_length(self::$method) ){
      $iv = substr(md5(self::$prefix.$password), 0, $length);
      return openssl_encrypt($textToEncrypt, self::$method, $secretHash, true, $iv);
    }
    return null;
  }
1168048
public FindingStatistics withCountBySeverity(java.util.Map<String, Integer> countBySeverity) {
        setCountBySeverity(countBySeverity);
        return this;
    }
721208
public static String randomNumber(Long length, TestContext context) {
        return new RandomNumberFunction().execute(Collections.singletonList(String.valueOf(length)), context);
    }
337492
protected function getRandomString($count)
    {
        // This string MUST stay FS safe, avoid special chars
        $base = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-';
        $ret = '';
        $strlen = strlen($base);
        for ($i = 0; $i < $count; ++$i) {
            $ret .= $base[random_int(0, $strlen - 1)];
        }

        return $ret;
    }
1094088
public static String encodePasswordWithPrefix(final String passwordInPlainText) {
        if (hasPrefix(passwordInPlainText)) {
            return passwordInPlainText;
        }

        return PREFIX + encodePassword(passwordInPlainText);
    }
1174991
public static String getRandomTextIgnoreRange(int floor, int ceil, int length, int[]... ranges) {
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < length; i++) {
            builder.append((char) getRandomIntegerIgnoreRange(floor, ceil, ranges));
        }
        return builder.toString();
    }
1150811
public VideoMultipleWrapper selectCount(@IntRange(from = 1, to = Integer.MAX_VALUE) int count) {
        this.mLimitCount = count;
        return this;
    }
1095653
protected static function _toAPRMD5($value, $count)
	{
		// 64 characters that are valid for APRMD5 passwords.
		$APRMD5 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';

		$aprmd5 = '';
		$count = abs($count);
		while (--$count)
		{
			$aprmd5 .= $APRMD5[$value & 0x3f];
			$value >>= 6;
		}
		return $aprmd5;
	}
56239
public static int getOccurenceCount(char c, String s) 
    {
        int ret = 0;

        for(int i = 0; i < s.length(); i++)
        {
            if(s.charAt(i) == c)
                ++ret;
        }

        return ret;
    }
936613
public static function random($count = 8, $keys = 'abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTWXYZ')
        {
            mt_srand((double)microtime() * 1000000);
            $random = [];
            $length = strlen($keys) - 1;
            for ($i = 0; $i < $count; ++$i) {
                $random[] = $keys[mt_rand(0, $length)];
            }
            return new static(implode('', $random));
        }