code: func NewCipher(nonce, key []byte, rounds int) (*Cipher, error) {
  	if rounds != 20 && rounds != 12 && rounds != 8 {
  		panic("chacha20/chacha: bad number of rounds")
  	}
  
  	c := new(Cipher)
  	if err := setup(&(c.state), nonce, key); err != nil {
  		return nil, err
  	}
  	c.rounds = rounds
  
  	if len(nonce) == INonceSize {
  		c.noncesize = INonceSize
  	} else {
  		c.noncesize = NonceSize
  	}
  
  	return c, nil
  }
docs: // NewCipher returns a new *chacha.Cipher implementing the ChaCha20/r or XChaCha20/r
  // (r = 8, 12 or 20) stream cipher. The nonce must be unique for one key for all time.
  // The length of the nonce determinds the version of ChaCha20:
  // - NonceSize:  ChaCha20/r with a 64 bit nonce and a 2^64 * 64 byte period.
  // - INonceSize: ChaCha20/r as defined in RFC 7539 and a 2^32 * 64 byte period.
  // - XNonceSize: XChaCha20/r with a 192 bit nonce and a 2^64 * 64 byte period.
  // If the nonce is neither 64, 96 nor 192 bits long, a non-nil error is returned.