func (h *Hash) UnmarshalBinary(data []byte) error {
expectedLen := len(MarshaledName) + 1 + 8 + 2*BlockSize
if len(data) < expectedLen {
func (h *Hash) UnmarshalBinary(data []byte) error {
expectedLen := len(MarshaledName) + 1 + 8 + 2*BlockSize
if len(data) < expectedLen {
}
if !bytes.HasPrefix(data, []byte(MarshaledName)) {
return errors.New("gogost/internal/gost34112012: no hash name prefix")
}
if !bytes.HasPrefix(data, []byte(MarshaledName)) {
return errors.New("gogost/internal/gost34112012: no hash name prefix")