pgregory.net/rand@v1.0.3-0.20230808192358-a0b8ce02f4da/global_go119.go (about)

     1  // Copyright 2022 Gregory Petrosyan <gregory.petrosyan@gmail.com>
     2  //
     3  // This Source Code Form is subject to the terms of the Mozilla Public
     4  // License, v. 2.0. If a copy of the MPL was not distributed with this
     5  // file, You can obtain one at https://mozilla.org/MPL/2.0/.
     6  
     7  //go:build go1.19 && !unsafe
     8  
     9  package rand
    10  
    11  import "hash/maphash"
    12  
    13  func rand64() uint64 {
    14  	return maphash.Bytes(maphash.MakeSeed(), nil)
    15  }