code: func encodeTargets(alg Algorithm, obj interface{}) (interface{}, interface{}, error) {
  	// determine what to encode
  	switch val := obj.(type) {
  	case *Token:
  		return val.Header, val.Payload, nil
  	}
  
  	objVal := reflect.ValueOf(obj)
  	objKind := objVal.Kind()
  	if objKind == reflect.Struct || (objKind == reflect.Ptr && objVal.Elem().Kind() == reflect.Struct) {
  		return grabEncodeTargets(alg, obj)
  	}
  
  	return alg.Header(), obj, nil
  }
docs: // encodeTargets determines what to encode.