// GoGOST -- Pure Go GOST cryptographic functions library
-// Copyright (C) 2015-2021 Sergey Matveev <stargrave@stargrave.org>
+// Copyright (C) 2015-2023 Sergey Matveev <stargrave@stargrave.org>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
func (h *Hash) UnmarshalBinary(data []byte) error {
expectedLen := len(MarshaledName) + 1 + 8 + 2*BlockSize
if len(data) < expectedLen {
- return fmt.Errorf("gogost/internal/gost34112012: len(data) != %d", expectedLen)
+ return fmt.Errorf("gogost/internal/gost34112012: len(data)=%d != %d", len(data), expectedLen)
}
if !bytes.HasPrefix(data, []byte(MarshaledName)) {
return errors.New("gogost/internal/gost34112012: no hash name prefix")