code: func (msg *sentMessage) appendPadding(params *MessageParams) error {
  	if len(params.Padding) != 0 {
  		// padding data was provided by the Dapp, just use it as is
  		msg.Raw = append(msg.Raw, params.Padding...)
  		return nil
  	}
  
  	rawSize := flagsLength + getSizeOfPayloadSizeField(params.Payload) + len(params.Payload)
  	if params.Src != nil {
  		rawSize += signatureLength
  	}
  	odd := rawSize % padSizeLimit
  	paddingSize := padSizeLimit - odd
  	pad := make([]byte, paddingSize)
  	_, err := crand.Read(pad)
  	if err != nil {
  		return err
  	}
  	if !validateDataIntegrity(pad, paddingSize) {
  		return errors.New("failed to generate random padding of size " + strconv.Itoa(paddingSize))
  	}
  	msg.Raw = append(msg.Raw, pad...)
  	return nil
  }
docs: // appendPadding appends the padding specified in params.
  // If no padding is provided in params, then random padding is generated.