Example #1
0
func (ol *ObjCLib) Hash() []byte {
	h := sha1.New()
	io.WriteString(h, ol.Name)
	util.HashFiles(h, ol.Sources)
	util.HashFiles(h, ol.XIBs)
	util.HashFiles(h, ol.Headers)
	return h.Sum(nil)
}
Example #2
0
func (y *Yacc) Hash() []byte {
	h := sha1.New()
	io.WriteString(h, YaccVersion)
	io.WriteString(h, y.Name)
	util.HashFiles(h, y.Sources)
	util.HashStrings(h, y.YaccOptions)
	return h.Sum(nil)
}
Example #3
0
func (mp *ManPage) Hash() []byte {
	h := sha1.New()

	io.WriteString(h, mp.Name)

	util.HashFiles(h, mp.Sources)
	util.HashStrings(h, os.Environ())
	return []byte{}
}
Example #4
0
func (cl *CLib) Hash() []byte {
	h := sha1.New()

	io.WriteString(h, CCVersion)
	io.WriteString(h, cl.Name)
	util.HashFiles(h, cl.Includes)
	io.WriteString(h, "clib")
	util.HashFiles(h, []string(cl.Sources))
	util.HashStrings(h, cl.CompilerOptions)
	util.HashStrings(h, cl.LinkerOptions)
	if cl.LinkShared {
		io.WriteString(h, "shared")
	}
	if cl.LinkStatic {
		io.WriteString(h, "static")
	}
	return h.Sum(nil)
}
Example #5
0
File: mksys.go Project: sevki/Posts
func (cl *MkSys) Hash() []byte {
	h := sha1.New()
	io.WriteString(h, cl.Mode)
	io.WriteString(h, cl.ARCH)
	io.WriteString(h, cl.OutPath)
	io.WriteString(h, cl.Mode)
	util.HashFiles(h, []string{cl.SysConf})

	return h.Sum(nil)
}
Example #6
0
func (cb *CBin) Hash() []byte {

	h := sha1.New()
	io.WriteString(h, CCVersion)
	io.WriteString(h, cb.Name)
	util.HashFilesWithExt(h, cb.Includes, ".h")
	util.HashFiles(h, []string(cb.Sources))
	util.HashStrings(h, cb.CompilerOptions)
	util.HashStrings(h, cb.LinkerOptions)
	return h.Sum(nil)
}
Example #7
0
func (k *Config) Hash() []byte {

	h := sha1.New()
	util.HashFiles(h, k.RamFiles)
	util.HashStrings(h, k.Code)
	util.HashStrings(h, k.Dev)
	util.HashStrings(h, k.Ip)
	util.HashStrings(h, k.Link)
	util.HashStrings(h, k.Sd)
	util.HashStrings(h, k.Uart)
	util.HashStrings(h, k.VGA)
	io.WriteString(h, k.Name)
	return h.Sum(nil)
}
Example #8
0
func (u *USB) Hash() []byte {
	h := sha1.New()
	util.HashFiles(h, []string{u.Conf})
	io.WriteString(h, u.Name)
	return []byte{}
}
Example #9
0
func (ia *IOSApplication) Hash() []byte {
	h := sha1.New()
	io.WriteString(h, ia.Name)
	util.HashFiles(h, []string{ia.InfoPlist})
	return h.Sum(nil)
}