# coding: utf-8
# PyGOST -- Pure Python GOST cryptographic functions library
-# Copyright (C) 2015-2021 Sergey Matveev <stargrave@stargrave.org>
+# Copyright (C) 2015-2024 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
"""
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