Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for StreamReader (0.27 sec)

  1. src/net/http/roundtrip_js.go

    	}
    }
    
    var errClosed = errors.New("net/http: reader is closed")
    
    // streamReader implements an io.ReadCloser wrapper for ReadableStream.
    // See https://fetch.spec.whatwg.org/#readablestream for more information.
    type streamReader struct {
    	pending []byte
    	stream  js.Value
    	err     error // sticky read error
    }
    
    func (r *streamReader) Read(p []byte) (n int, err error) {
    	if r.err != nil {
    		return 0, r.err
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  2. src/crypto/cipher/example_test.go

    	stream := cipher.NewOFB(block, iv[:])
    
    	reader := &cipher.StreamReader{S: stream, R: bReader}
    	// Copy the input to the output stream, decrypting as we go.
    	if _, err := io.Copy(os.Stdout, reader); err != nil {
    		panic(err)
    	}
    
    	// Note that this example is simplistic in that it omits any
    	// authentication of the encrypted data. If you were actually to use
    	// StreamReader in this manner, an attacker could flip arbitrary bits in
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 30 16:23:44 UTC 2018
    - 11.8K bytes
    - Viewed (0)
  3. src/crypto/ecdh/ecdh_test.go

    	benchmarkAllCurves(b, func(b *testing.B, curve ecdh.Curve) {
    		c, err := chacha20.NewUnauthenticatedCipher(make([]byte, 32), make([]byte, 12))
    		if err != nil {
    			b.Fatal(err)
    		}
    		rand := cipher.StreamReader{
    			S: c, R: zeroReader,
    		}
    
    		peerKey, err := curve.GenerateKey(rand)
    		if err != nil {
    			b.Fatal(err)
    		}
    		peerShare := peerKey.PublicKey().Bytes()
    		b.ResetTimer()
    		b.ReportAllocs()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 18:23:49 UTC 2024
    - 18K bytes
    - Viewed (0)
  4. src/crypto/ecdsa/ecdsa.go

    	if err != nil {
    		return nil, err
    	}
    
    	// Create a CSPRNG that xors a stream of zeros with
    	// the output of the AES-CTR instance.
    	const aesIV = "IV for ECDSA CTR"
    	return &cipher.StreamReader{
    		R: zeroReader,
    		S: cipher.NewCTR(block, []byte(aesIV)),
    	}, nil
    }
    
    type zr struct{}
    
    var zeroReader = zr{}
    
    // Read replaces the contents of dst with zeros. It is safe for concurrent use.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 20.4K bytes
    - Viewed (0)
Back to top