- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 104 for readFull (0.19 sec)
-
cmd/bitrot.go
return errFileCorrupt } bufp := xioutil.ODirectPoolSmall.Get().(*[]byte) defer xioutil.ODirectPoolSmall.Put(bufp) for left > 0 { // Read expected hash... h.Reset() n, err := io.ReadFull(r, hashBuf) if err != nil { // Read's failed for object with right size, file is corrupt. return err } // Subtract hash length.. left -= int64(n) if left < shardSize { shardSize = left
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 7.6K bytes - Viewed (0) -
src/internal/coverage/decodemeta/decodefile.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Oct 14 22:30:23 UTC 2023 - 6.8K bytes - Viewed (0) -
cmd/erasure-heal_test.go
if err != nil { t.Fatalf("Test %d: failed to create ErasureStorage: %v", i, err) } data := make([]byte, test.size) if _, err = io.ReadFull(rand.Reader, data); err != nil { t.Fatalf("Test %d: failed to create random test data: %v", i, err) } buffer := make([]byte, test.blocksize, 2*test.blocksize) writers := make([]io.Writer, len(disks))
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 7.9K bytes - Viewed (0) -
src/net/parse.go
ok = true } return } func (f *file) readLine() (s string, ok bool) { if s, ok = f.getLineFromData(); ok { return } if len(f.data) < cap(f.data) { ln := len(f.data) n, err := io.ReadFull(f.file, f.data[ln:cap(f.data)]) if n >= 0 { f.data = f.data[0 : ln+n] } if err == io.EOF || err == io.ErrUnexpectedEOF { f.atEOF = true } } s, ok = f.getLineFromData() return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 06 14:00:54 UTC 2024 - 5.7K bytes - Viewed (0) -
src/crypto/x509/pem_decrypt.go
ciph := cipherByKey(alg) if ciph == nil { return nil, errors.New("x509: unknown encryption mode") } iv := make([]byte, ciph.blockSize) if _, err := io.ReadFull(rand, iv); err != nil { return nil, errors.New("x509: cannot generate IV: " + err.Error()) } // The salt is the first 8 bytes of the initialization vector, // matching the key derivation in DecryptPEMBlock.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 7.2K bytes - Viewed (0) -
src/runtime/crash_unix_test.go
if err := pw.Close(); err != nil { t.Log("closing write pipe: ", err) } defer pr.Close() // Wait for "x\nx\n" to indicate almost-readiness. buf := make([]byte, 4) _, err = io.ReadFull(pr, buf) if err != nil || string(buf) != "x\nx\n" { t.Fatal("subprocess failed; output:\n", string(buf)) } // The child blockers print "x\n" and then block on a lock. Receiving
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 12 20:11:47 UTC 2023 - 9.2K bytes - Viewed (0) -
src/compress/lzw/reader_test.go
} func TestHiCodeDoesNotOverflow(t *testing.T) { r := NewReader(devZero{}, LSB, 8) d := r.(*Reader) buf := make([]byte, 1024) oldHi := uint16(0) for i := 0; i < 100; i++ { if _, err := io.ReadFull(r, buf); err != nil { t.Fatalf("i=%d: %v", i, err) } // The hi code should never decrease. if d.hi < oldHi { t.Fatalf("i=%d: hi=%d decreased from previous value %d", i, d.hi, oldHi) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 18 16:57:58 UTC 2024 - 7.6K bytes - Viewed (0) -
src/net/http/internal/chunked.go
if n > 0 && cr.r.Buffered() < 2 { // We have some data. Return early (per the io.Reader // contract) instead of potentially blocking while // reading more. break } if _, cr.err = io.ReadFull(cr.r, cr.buf[:2]); cr.err == nil { if string(cr.buf[:]) != "\r\n" { cr.err = errors.New("malformed chunked encoding") break } } else { if cr.err == io.EOF {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 7.8K bytes - Viewed (0) -
src/crypto/ecdh/nist.go
if err != nil { return nil, err } return newBoringPrivateKey(c, key, bytes) } key := make([]byte, len(c.scalarOrder)) randutil.MaybeReadByte(rand) for { if _, err := io.ReadFull(rand, key); err != nil { return nil, err } // Mask off any excess bits if the size of the underlying field is not a // whole number of bytes, which is only the case for P-521. We use a
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 8.1K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/aes/aes.go
blockSize := aes.BlockSize paddingSize := blockSize - (len(data) % blockSize) result := make([]byte, blockSize+len(data)+paddingSize) iv := result[:blockSize] if _, err := io.ReadFull(rand.Reader, iv); err != nil { return nil, errors.New("unable to read sufficient random bytes") } copy(result[blockSize:], data) // add PKCS#7 padding for CBC
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jul 21 19:25:52 UTC 2023 - 9.6K bytes - Viewed (0)