Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for chanchan (0.21 sec)

  1. test/chan/sendstmt.go

    // license that can be found in the LICENSE file.
    
    // Test various parsing cases that are a little
    // different now that send is a statement, not an expression.
    
    package main
    
    func main() {
    	chanchan()
    	sendprec()
    }
    
    func chanchan() {
    	cc := make(chan chan int, 1)
    	c := make(chan int, 1)
    	cc <- c
    	select {
    	case <-cc <- 2:
    	default:
    		panic("nonblock")
    	}
    	if <-c != 2 {
    		panic("bad receive")
    	}
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 15 02:39:16 UTC 2017
    - 672 bytes
    - Viewed (0)
  2. src/math/rand/v2/chacha8.go

    	"errors"
    	"internal/byteorder"
    	"internal/chacha8rand"
    )
    
    // A ChaCha8 is a ChaCha8-based cryptographically strong
    // random number generator.
    type ChaCha8 struct {
    	state chacha8rand.State
    
    	// The last readLen bytes of readBuf are still to be consumed by Read.
    	readBuf [8]byte
    	readLen int // 0 <= readLen <= 8
    }
    
    // NewChaCha8 returns a new ChaCha8 seeded with the given seed.
    func NewChaCha8(seed [32]byte) *ChaCha8 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:09:08 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  3. src/internal/chacha8rand/chacha8.go

    	data := make([]byte, 6*8)
    	copy(data, "chacha8:")
    	used := (s.c/ctrInc)*chunk + s.i
    	byteorder.BePutUint64(data[1*8:], uint64(used))
    	for i, seed := range s.seed {
    		byteorder.LePutUint64(data[(2+i)*8:], seed)
    	}
    	return data
    }
    
    type errUnmarshalChaCha8 struct{}
    
    func (*errUnmarshalChaCha8) Error() string {
    	return "invalid ChaCha8 encoding"
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:47:29 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  4. src/internal/chacha8rand/chacha8_generic.go

    // Copyright 2023 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.
    
    // ChaCha8 is ChaCha with 8 rounds.
    // See https://cr.yp.to/chacha/chacha-20080128.pdf.
    //
    // ChaCha8 operates on a 4x4 matrix of uint32 values, initially set to:
    //
    //	const1 const2 const3 const4
    //	seed   seed   seed   seed
    //	seed   seed   seed   seed
    //	counter64     0      0
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:32:54 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  5. src/internal/chacha8rand/chacha8_amd64.s

    // Copyright 2023 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.
    
    #include "textflag.h"
    
    // ChaCha8 is ChaCha with 8 rounds.
    // See https://cr.yp.to/chacha/chacha-20080128.pdf.
    // See chacha8_generic.go for additional details.
    
    // ROL rotates the uint32s in register R left by N bits, using temporary T.
    #define ROL(N, R, T) \
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  6. src/math/rand/v2/chacha8_test.go

    	"chacha8:\x00\x00\x00\x00\x00\x00\x00\x06ABCDEFGHIJKLMNOPQRSTUVWXYZ123456",
    	"chacha8:\x00\x00\x00\x00\x00\x00\x00\aABCDEFGHIJKLMNOPQRSTUVWXYZ123456",
    	"chacha8:\x00\x00\x00\x00\x00\x00\x00\bABCDEFGHIJKLMNOPQRSTUVWXYZ123456",
    	"chacha8:\x00\x00\x00\x00\x00\x00\x00\tABCDEFGHIJKLMNOPQRSTUVWXYZ123456",
    	"chacha8:\x00\x00\x00\x00\x00\x00\x00\nABCDEFGHIJKLMNOPQRSTUVWXYZ123456",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:09:08 UTC 2024
    - 55K bytes
    - Viewed (0)
  7. test/chancap.go

    Clément Chigot <******@****.***> 1538380720 +0200
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 26 14:06:28 UTC 2018
    - 1.6K bytes
    - Viewed (0)
  8. src/crypto/tls/handshake_server_test.go

    	cmd.Stderr = &output
    	if err := cmd.Start(); err != nil {
    		return nil, nil, err
    	}
    
    	connChan := make(chan any, 1)
    	go func() {
    		tcpConn, err := l.Accept()
    		if err != nil {
    			connChan <- err
    			return
    		}
    		connChan <- tcpConn
    	}()
    
    	var tcpConn net.Conn
    	select {
    	case connOrError := <-connChan:
    		if err, ok := connOrError.(error); ok {
    			return nil, nil, err
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 64.7K bytes
    - Viewed (0)
  9. src/internal/chacha8rand/chacha8_arm64.s

    	VADD A.S4, B.S4, A.S4; VEOR D.B16, A.B16, D.B16;   VTBL V31.B16, [D.B16], D.B16; \
    	VADD C.S4, D.S4, C.S4; VEOR B.B16, C.B16, V30.B16; VSHL  $7, V30.S4, B.S4; VSRI $25, V30.S4, B.S4
    
    // block runs 4 ChaCha8 block transformations in the four stripes of the V registers.
    
    // func block(seed *[8]uint32, blocks *[4][16]uint32, counter uint32)
    TEXT ·block<ABIInternal>(SB), NOSPLIT, $16
    	// seed in R0
    	// blocks in R1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  10. src/runtime/chan_test.go

    				c <- i
    			}
    			if len(c) != chanCap || cap(c) != chanCap {
    				t.Fatalf("chan[%d]: bad len/cap, expect %v/%v, got %v/%v", chanCap, chanCap, chanCap, len(c), cap(c))
    			}
    		}
    
    	}
    }
    
    func TestNonblockRecvRace(t *testing.T) {
    	n := 10000
    	if testing.Short() {
    		n = 100
    	}
    	for i := 0; i < n; i++ {
    		c := make(chan int, 1)
    		c <- 1
    		go func() {
    			select {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 20:47:35 UTC 2023
    - 23.4K bytes
    - Viewed (0)
Back to top