code: func (vm *Engine) checkHashTypeEncoding(hashType SigHashType) error {
  	if !vm.hasFlag(ScriptVerifyStrictEncoding) {
  		return nil
  	}
  
  	sigHashType := hashType & ^SigHashAnyOneCanPay
  	if sigHashType < SigHashAll || sigHashType > SigHashSingle {
  		str := fmt.Sprintf("invalid hash type 0x%x", hashType)
  		return scriptError(ErrInvalidSigHashType, str)
  	}
  	return nil
  }
docs: // checkHashTypeEncoding returns whether or not the passed hashtype adheres to
  // the strict encoding requirements if enabled.