]> Cypherpunks.ru repositories - gogost.git/blobdiff - gost28147/mac.go
Raise copyright years
[gogost.git] / gost28147 / mac.go
index bcfd52c5ed5044d5eee3f08524e5d5bd588e498b..9c35ab526dfc0448de4df3eb18442e41caca15e2 100644 (file)
@@ -1,5 +1,5 @@
 // GoGOST -- Pure Go GOST cryptographic functions library
-// Copyright (C) 2015-2019 Sergey Matveev <stargrave@stargrave.org>
+// Copyright (C) 2015-2020 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
@@ -42,10 +42,10 @@ type MAC struct {
 // following ones are fed to Write function.
 func (c *Cipher) NewMAC(size int, iv []byte) (*MAC, error) {
        if size == 0 || size > 8 {
-               return nil, errors.New("Invalid tag size")
+               return nil, errors.New("gogost/gost28147: invalid tag size")
        }
        if len(iv) != BlockSize {
-               return nil, errors.New("iv length is not equal to blocksize")
+               return nil, errors.New("gogost/gost28147: len(iv) != 8")
        }
        m := MAC{c: c, size: size, iv: iv}
        n2, n1 := block2nvs(iv)