예제 #1
0
파일: signature.go 프로젝트: kitak/magick
// Signature computes a message digest from an image pixel stream with an
// implementation of the NIST SHA-256 Message Digest algorithm. This
// signature uniquely identifies the image and is convenient for determining
// if an image has been modified or whether two images are identical.
func (im *Image) Signature() uint {
	return uint(C.SignatureImage(im.image))
}
예제 #2
0
파일: signature.go 프로젝트: Kimbsen/magick
// Signature computes a message digest from an image pixel stream with an
// implementation of the NIST SHA-256 Message Digest algorithm. This
// signature uniquely identifies the image and is convenient for determining
// if an image has been modified or whether two images are identical.
func (im *Image) Signature() string {
	if !im.HasProperty("signature") {
		C.SignatureImage(im.image)
	}
	return im.Property("signature")
}