blob: 73141574432b150e4b50c3d11acd789550aa79f3 [file] [edit]
// Copyright 2026 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build fips140v1.0 || fips140v1.26
package rand
import (
"crypto/internal/fips140/drbg"
"io"
)
// IsDefaultReader reports whether r is the default [crypto/rand.Reader].
//
// If true, the Read method of r can be assumed to call [drbg.Read].
func IsDefaultReader(r io.Reader) bool {
_, ok := r.(drbg.DefaultReader)
return ok
}