func (p *putter) hashContent(r io.ReadSeeker) (string, string, string, error) {
	m := md5.New()
	s := sha256.New()
	mw := io.MultiWriter(m, s, p.md5)
	if _, err := io.Copy(mw, r); err != nil {
		return "", "", "", err
	}
	md5Sum := m.Sum(nil)
	shaSum := hex.EncodeToString(s.Sum(nil))
	etag := hex.EncodeToString(md5Sum)
	// add to checksum of all parts for verification on upload completion
	if _, err := p.md5OfParts.Write(md5Sum); err != nil {
		return "", "", "", err
	}
	return base64.StdEncoding.EncodeToString(md5Sum), shaSum, etag, nil
}
func (p *putter) hashContent(r io.ReadSeeker) (string, string, string, error) {
	m := md5.New()
	s := sha256.New()
	mw := io.MultiWriter(m, s, p.md5)
	if _, err := io.Copy(mw, r); err != nil {
		return "", "", "", err
	}
	md5Sum := m.Sum(nil)
	shaSum := hex.EncodeToString(s.Sum(nil))
	etag := hex.EncodeToString(md5Sum)
	
	if _, err := p.md5OfParts.Write(md5Sum); err != nil {
		return "", "", "", err
	}
	return base64.StdEncoding.EncodeToString(md5Sum), shaSum, etag, nil
}
func ( p * putter ) hashContent ( r io . ReadSeeker ) ( string , string , string , error ) { m := md5 . New ( ) s := sha256 . New ( ) mw := io . MultiWriter ( m , s , p . md5 ) if _ , err := io . Copy ( mw , r ) ; err != nil { return " " , " " , " " , err } md5Sum := m . Sum ( nil ) shaSum := hex . EncodeToString ( s . Sum ( nil ) ) etag := hex . EncodeToString ( md5Sum ) // add to checksum of all parts for verification on upload completion if _ , err := p . md5OfParts . Write ( md5Sum ) ; err != nil { return " " , " " , " " , err } return base64 . StdEncoding . EncodeToString ( md5Sum ) , shaSum , etag , nil }
// Md5 functions
Md5 functions