<commit_before>// Copyright 2017 The Netstack Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Package hash contains utility functions for hashing.
package hash

import (
	"crypto/rand"
	"encoding/binary"
	"fmt"

	"github.com/google/netstack/tcpip/header"
)

var hashIV = RandN32(1)[0]

// RandN32 generates a slice of n cryptographic random 32-bit numbers.
func RandN32(n int) []uint32 {
	b := make([]byte, 4*n)
	if _, err := rand.Read(b); err != nil {
		panic(fmt.Sprintf("unable to get random numbers: %v", err))
	}
	r := make([]uint32, n)
	for i := range r {<commit_msg>Simplify simple panic string generation<commit_after>// Copyright 2017 The Netstack Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Package hash contains utility functions for hashing.
package hash

import (
	"crypto/rand"
	"encoding/binary"

	"github.com/google/netstack/tcpip/header"
)

var hashIV = RandN32(1)[0]

// RandN32 generates a slice of n cryptographic random 32-bit numbers.
func RandN32(n int) []uint32 {
	b := make([]byte, 4*n)
	if _, err := rand.Read(b); err != nil {
		panic("unable to get random numbers: " + err.Error())
	}
	r := make([]uint32, n)
	for i := range r {
{'fraction_non_alphanumeric': 0.1262135922330097, 'fraction_numerical': 0.028379387602688575, 'mean_word_length': 3.75177304964539, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3681959', 'n_tokens_mistral': 465, 'n_tokens_neox': 434, 'n_words': 164}