// NewChaChaEncrypter initialize a new ChaChaStream interfaced with Encrypter
NewChaChaEncrypter initialize a new ChaChaStream interfaced with Encrypter
// NewChaChaEncrypter initialize a new ChaChaStream interfaced with Encrypter
func NewChaChaEncrypter(key []byte, iv []byte) (*ChaChaStream, error) {
	cipher, err := chacha20.NewCipher(iv, key)
	if err != nil {
		return nil, err
	}
	c := ChaChaStream{
		cipher: cipher,
	}
	return &c, nil
}
func NewChaChaEncrypter ( key [ ] byte , iv [ ] byte ) ( * ChaChaStream , error ) { cipher , err := chacha20 . NewCipher ( iv , key ) if err != nil { return nil , err } c := ChaChaStream { cipher : cipher , } return & c , nil }
NewChaChaEncrypter initialize a new ChaChaStream interfaced with Encrypter
NewChaChaEncrypter initialize a new ChaChaStream interfaced with Encrypter