X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=pygost%2Fmgm.py;h=aabce95bbd04ad9504505352350cee8cff53179b;hb=ade04d6c0456bb39793e8b3547ac99aeffe8af73;hp=340fae6eb9617f311cf13114b5512181d5a0de51;hpb=03de94212cd7c039e6a7f4f947fbd2d7d6c9b70e;p=pygost.git diff --git a/pygost/mgm.py b/pygost/mgm.py index 340fae6..aabce95 100644 --- a/pygost/mgm.py +++ b/pygost/mgm.py @@ -1,6 +1,6 @@ # coding: utf-8 # PyGOST -- Pure Python GOST cryptographic functions library -# Copyright (C) 2015-2020 Sergey Matveev +# Copyright (C) 2015-2021 Sergey Matveev # # 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 @@ -58,7 +58,7 @@ class MGM(object): """ if bs not in (8, 16): raise ValueError("Only 64/128-bit blocksizes allowed") - self.tag_size = bs if tag_size is None else bs + self.tag_size = bs if tag_size is None else tag_size if self.tag_size < 4 or self.tag_size > bs: raise ValueError("Invalid tag_size") self.encrypter = encrypter