GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Why Go
  • Case Studies
  • Use Cases
  • Security
  • Learn
  • Effective Go
  • Go User Manual
  • Standard library
  • Release Notes
  • API
  • Packages
  • Recorded Talks
  • Meetups
  • Conferences

This view

  • Original page
  • New address

GeezerVison is showing pkg.go.dev — cryptotest package - testing/cryptotest - Go Packages

Details

  • checked Valid go.mod file

    The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.

  • checked Redistributable license

    Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.

  • checked Tagged version

    Modules with tagged versions give importers more predictable builds.

  • checked Stable version

    When a project reaches major version v1 it is considered stable.

  • Learn more about best practices

Repository

cs.opensource.google/go/go

Links

  • Report a Vulnerability

Documentation ¶

Overview ¶

Package cryptotest provides deterministic random source testing.

Index ¶

  • func SetGlobalRandom(t *testing.T, seed uint64)

Constants ¶

This section is empty.

Variables ¶

This section is empty.

Functions ¶

func SetGlobalRandom ¶

func SetGlobalRandom(t *testing.T, seed uint64)

SetGlobalRandom sets a global, deterministic cryptographic randomness source for the duration of test t. It affects crypto/rand, and all implicit sources of cryptographic randomness in the crypto/... packages.

SetGlobalRandom may be called multiple times in the same test to reset the random stream or change the seed.

Because SetGlobalRandom affects the whole process, it cannot be used in parallel tests or tests with parallel ancestors.

Note that the way cryptographic algorithms use randomness is generally not specified and may change over time. Thus, if a test expects a specific output from a cryptographic function, it may fail in the future even if it uses SetGlobalRandom.

SetGlobalRandom is not supported when building against the Go Cryptographic Module v1.0.0 (i.e. when crypto/fips140.Version returns "v1.0.0").

Types ¶

This section is empty.

Source Files ¶

View all Source files
  • rand.go
Click to show internal directories.
Click to hide internal directories.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.