public_html/wp-content/plugins/google-document-embedder/libs/lib-secure.php
/**
 * Generate random document code
 *
 * @since	2.5.0.1
 * @return  string Random string used for secure doc link in database
 */
Generate random document code
@since       2.5.0.1
@return  string Random string used for secure doc link in database
Generate random document code @since 2 . 5 . 0 . 1 @return string Random string used for secure doc link in database
function gde_secure_code( $length = 10 ) {
	$alpha = 'aeioubdghjmnpqrstvyz';
	$alpha .= strtoupper( $alpha );
	$numer = '1234567890';
	$code = '';
	$alt = time() % 2;
	for ( $i = 0; $i < $length; $i++ ) {
		if ( $alt == 1 ) {
			$code .= $alpha[(rand() % strlen( $alpha ))];
			$alt = 0;
		} else {
			$code .= $numer[(rand() % strlen( $numer ))];
			$alt = 1;
		}
	}
	return $code;
}
function gde_secure_code ( $ length = 10 ) { $ alpha = 'aeioubdghjmnpqrstvyz' ; $ alpha .= strtoupper ( $ alpha ) ; $ numer = '1234567890' ; $ code = '' ; $ alt = time ( ) % 2 ; for ( $ i = 0 ; $ i < $ length ; $ i ++ ) { if ( $ alt == 1 ) { $ code .= $ alpha [ ( rand ( ) % strlen ( $ alpha ) ) ] ; $ alt = 0 ; } else { $ code .= $ numer [ ( rand ( ) % strlen ( $ numer ) ) ] ; $ alt = 1 ; } } return $ code ; }
Generate random document code
 @since       2.5.0.1
 @return  string Random string used for secure doc link in database
Generate random document code @since 2 . 5 . 0 . 1 @return string Random string used for secure doc link in database