gotosocial/vendor/github.com/tetratelabs/wazero/internal/platform/crypto.go
kim 1e7b32490d
[experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863)
This allows for building GoToSocial with [SQLite transpiled to WASM](https://github.com/ncruces/go-sqlite3) and accessed through [Wazero](https://wazero.io/).
2024-05-27 17:46:15 +02:00

18 lines
420 B
Go

package platform
import (
"io"
"math/rand"
)
// seed is a fixed seed value for NewFakeRandSource.
//
// Trivia: While arbitrary, 42 was chosen as it is the "Ultimate Answer" in
// the Douglas Adams novel "The Hitchhiker's Guide to the Galaxy."
const seed = int64(42)
// NewFakeRandSource returns a deterministic source of random values.
func NewFakeRandSource() io.Reader {
return rand.New(rand.NewSource(seed))
}