code: func NewStreamManager(id uint32, key []byte) (manager *StreamManager, err error) {
  	var stream Stream
  	manager = new(StreamManager)
  	switch id {
  	case NoStreamID:
  		stream = crypto.NewInsecureStream()
  	case SalsaStreamID:
  		stream, err = crypto.NewSalsaStream(key)
  	case ChaChaStreamID:
  		stream, err = crypto.NewChaChaStream(key)
  	default:
  		return nil, ErrUnsupportedStreamType
  	}
  	manager.Stream = stream
  	return
  }
docs: // NewStreamManager initialize a new StreamManager