func (r *AuthRequest) Hash() ([]byte, error) {
	method := r.Method
	url := r.URL
	timestamp := r.Credentials["x-timestamp"]

	toSign := []byte{}
	if len(method) > 0 {
		toSign = append(toSign, []byte(method)...)
	}
	if len(url) > 0 {
		toSign = append(toSign, []byte(url)...)
	}
	if len(timestamp) > 0 {
		toSign = append(toSign, []byte(timestamp)...)
	}

	if r.Content != nil {
		toSign = append(toSign, r.Content...)
	}

	result := sha256.Sum256(toSign)
	return result[:], nil
}
// Hash retrieves a SHA256 checksum of the request content
Hash retrieves a SHA256 checksum of the request content
// Hash retrieves a SHA256 checksum of the request content
func (r *AuthRequest) Hash() ([]byte, error) {
	method := r.Method
	url := r.URL
	timestamp := r.Credentials["x-timestamp"]
	toSign := []byte{}
	if len(method) > 0 {
		toSign = append(toSign, []byte(method)...)
	}
	if len(url) > 0 {
		toSign = append(toSign, []byte(url)...)
	}
	if len(timestamp) > 0 {
		toSign = append(toSign, []byte(timestamp)...)
	}
	if r.Content != nil {
		toSign = append(toSign, r.Content...)
	}
	result := sha256.Sum256(toSign)
	return result[:], nil
}
func ( r * AuthRequest ) Hash ( ) ( [ ] byte , error ) { method := r . Method url := r . URL timestamp := r . Credentials [ " " ] toSign := [ ] byte { } if len ( method ) > 0 { toSign = append ( toSign , [ ] byte ( method ) ... ) } if len ( url ) > 0 { toSign = append ( toSign , [ ] byte ( url ) ... ) } if len ( timestamp ) > 0 { toSign = append ( toSign , [ ] byte ( timestamp ) ... ) } if r . Content != nil { toSign = append ( toSign , r . Content ... ) } result := sha256 . Sum256 ( toSign ) return result [ : ] , nil }
Hash retrieves a SHA256 checksum of the request content
Hash retrieves a SHA256 checksum of the request content