]> Cypherpunks.ru repositories - gogost.git/blobdiff - internal/gost34112012/hash.go
Slightly refactored error messages
[gogost.git] / internal / gost34112012 / hash.go
index 6d56ca0eeb40806d4f7e8fe8bd382957a7e4c2ac..0e6d02a882a06642dac5da2e1e02058dd183a7ad 100644 (file)
@@ -452,7 +452,7 @@ func (h *Hash) MarshalBinary() (data []byte, err error) {
 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")