func NewFingerprint(sum []byte, validate func([]byte) error) (Fingerprint, error) {
	if validate == nil {
		return Fingerprint{}, errors.New("missing validate func")
	}

	if err := validate(sum); err != nil {
		return Fingerprint{}, errors.Trace(err)
	}
	return newFingerprint(sum), nil
}
// NewFingerprint returns wraps the provided raw hash sum. This function
// roundtrips with Fingerprint.Bytes().
NewFingerprint returns wraps the provided raw hash sum. This function
roundtrips with Fingerprint.Bytes().
// NewFingerprint returns wraps the provided raw hash sum . This function // roundtrips with Fingerprint . Bytes () .
func NewFingerprint(sum []byte, validate func([]byte) error) (Fingerprint, error) {
	if validate == nil {
		return Fingerprint{}, errors.New("missing validate func")
	}
	if err := validate(sum); err != nil {
		return Fingerprint{}, errors.Trace(err)
	}
	return newFingerprint(sum), nil
}
func NewFingerprint ( sum [ ] byte , validate func ( [ ] byte ) error ) ( Fingerprint , error ) { if validate == nil { return Fingerprint { } , errors . New ( " " ) } if err := validate ( sum ) ; err != nil { return Fingerprint { } , errors . Trace ( err ) } return newFingerprint ( sum ) , nil }
NewFingerprint returns wraps the provided raw hash sum.
NewFingerprint returns wraps the provided raw hash sum .