// Hash calculation after serializing objects
Hash calculation after serializing objects
// Hash calculation after serializing objects
func EncodeAndHash(o interface{}) ([]byte, error) {
	if o == nil {
		return NilHashSlice, nil
	}
	v := reflect.ValueOf(o)
	if !v.IsValid() {
		return NilHashSlice, nil
	}
	hasher := RealCipher.Hasher()
	if err := rtl.Encode(o, hasher); err != nil {
		return nil, err
	}
	return hasher.Sum(nil), nil
}
func EncodeAndHash ( o interface { } ) ( [ ] byte , error ) { if o == nil { return NilHashSlice , nil } v := reflect . ValueOf ( o ) if ! v . IsValid ( ) { return NilHashSlice , nil } hasher := RealCipher . Hasher ( ) if err := rtl . Encode ( o , hasher ) ; err != nil { return nil , err } return hasher . Sum ( nil ) , nil }
Hash calculation after serializing objects
Hash calculation after serializing objects