- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for RandReader (0.21 sec)
-
src/crypto/internal/boring/rand.go
//go:build boringcrypto && linux && (amd64 || arm64) && !android && !msan package boring // #include "goboringcrypto.h" import "C" import "unsafe" type randReader int func (randReader) Read(b []byte) (int, error) { // Note: RAND_bytes should never fail; the return value exists only for historical reasons. // We check it even so.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 20 17:51:31 UTC 2023 - 696 bytes - Viewed (0) -
src/crypto/internal/boring/notboring.go
// when BoringCrypto is in use. It is a no-op without BoringCrypto. func UnreachableExceptTests() {} type randReader int func (randReader) Read(b []byte) (int, error) { panic("boringcrypto: not available") } const RandReader = randReader(0) func NewSHA1() hash.Hash { panic("boringcrypto: not available") } func NewSHA224() hash.Hash { panic("boringcrypto: not available") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jan 26 22:52:27 UTC 2024 - 4.9K bytes - Viewed (0) -
src/crypto/rand/rand_unix.go
"crypto/internal/boring" "errors" "io" "os" "sync" "sync/atomic" "syscall" "time" ) const urandomDevice = "/dev/urandom" func init() { if boring.Enabled { Reader = boring.RandReader return } Reader = &reader{} } // A reader satisfies reads by reading from urandomDevice type reader struct { f io.Reader mu sync.Mutex
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Oct 01 08:32:46 UTC 2022 - 1.8K bytes - Viewed (0) -
src/crypto/ecdh/nist.go
return c.name } var errInvalidPrivateKey = errors.New("crypto/ecdh: invalid private key") func (c *nistCurve[Point]) GenerateKey(rand io.Reader) (*PrivateKey, error) { if boring.Enabled && rand == boring.RandReader { key, bytes, err := boring.GenerateKeyECDH(c.name) if err != nil { return nil, err } return newBoringPrivateKey(c, key, bytes) } key := make([]byte, len(c.scalarOrder))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 8.1K bytes - Viewed (0)