<commit_before>/*
 * Cryptographically strong source of randomness: Based on the
 * io.Reader instance assigned to "rand.Reader"; usually "/dev/urandom"  
 *
 * (c) 2012 <NAME>   >Y<
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package crypto

///////////////////////////////////////////////////////////////////////
// Import external declarations.

import (
	"crypto/rand"
	"math/big"
)

///////////////////////////////////////////////////////////////////////
// Cryptographically strong source of random bits 

/*
 * Source of randomness: 
 */
type prng struct {
	mask	*big.Int
}

//=====================================================================
/*
 * Get next (unsigned) 64-bit integer value.
 * @return int64 - random integer
 */
func (p *prng) Int63() int64 {

	val,err := rand.Int (rand.Reader, mask)
	if err != nil {
		panic("PRNG failure: " + err.Error())
	}
	return val.Int64()
}

//---------------------------------------------------------------------
/*
 * Seeding a source: not necessary, because random bits are generated
 * on a system level by either a hardware RNG or a cryptographically
 * secure PRNG algorithm.
 * @param seed int64 - seeding value
 */
func (p *prng) Seed(seed int64) {
	// intentionally not implemented
}

//=====================================================================
/*
 * Instantiate a new source for random bits.
 * @return *prng - reference to rand.Source instance
 */<commit_msg>Fixed mask bug.<commit_after>/*
 * Cryptographically strong source of randomness: Based on the
 * io.Reader instance assigned to "rand.Reader"; usually "/dev/urandom"  
 *
 * (c) 2012 <NAME>   >Y<
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package crypto

///////////////////////////////////////////////////////////////////////
// Import external declarations.

import (
	"crypto/rand"
	"math/big"
)

///////////////////////////////////////////////////////////////////////
// Cryptographically strong source of random bits 

/*
 * Source of randomness: 
 */
type prng struct {
	mask	*big.Int
}

//=====================================================================
/*
 * Get next (unsigned) 64-bit integer value.
 * @return int64 - random integer
 */
func (p *prng) Int63() int64 {

	val,err := rand.Int (rand.Reader, p.mask)
	if err != nil {
		panic("PRNG failure: " + err.Error())
	}
	return val.Int64()
}

//---------------------------------------------------------------------
/*
 * Seeding a source: not necessary, because random bits are generated
 * on a system level by either a hardware RNG or a cryptographically
 * secure PRNG algorithm.
 * @param seed int64 - seeding value
 */
func (p *prng) Seed(seed int64) {
	// intentionally not implemented
}

//=====================================================================
/*
 * Instantiate a new source for random bits.
 * @return *prng - reference to rand.Source instance
 */
{'fraction_non_alphanumeric': 0.2529296875, 'fraction_numerical': 0.00927734375, 'mean_word_length': 2.3943661971830985, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6119388', 'n_tokens_mistral': 1061, 'n_tokens_neox': 990, 'n_words': 440}