X-Git-Url: http://www.git.cypherpunks.ru/?p=pygost.git;a=blobdiff_plain;f=pygost%2Fgost341194.py;h=ba20a6eb2c04fff687a59331c199ed7dd5a2a002;hp=4ffb45e63f189cb4a4c1027b884c68ee54fddf6e;hb=31b08d5a78505f0ae1a144e58d023d84eda2cc6e;hpb=82af8726ef5d5e2752089a45750e56c9910398c7 diff --git a/pygost/gost341194.py b/pygost/gost341194.py index 4ffb45e..ba20a6e 100644 --- a/pygost/gost341194.py +++ b/pygost/gost341194.py @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . -""" GOST R 34.11-94 hash function +"""GOST R 34.11-94 hash function This is implementation of :rfc:`5831`. Most function and variable names are taken according to specification's terminology. @@ -58,7 +58,7 @@ def P(x): def _chi(Y): - """ Chi function + """Chi function This is some kind of LFSR. """ @@ -79,7 +79,7 @@ def _chi(Y): def _step(hin, m, sbox): - """ Step function + """Step function H_out = f(H_in, m) """ @@ -126,7 +126,7 @@ def _step(hin, m, sbox): class GOST341194(PEP247): - """ GOST 34.11-94 big-endian hash + """GOST 34.11-94 big-endian hash >>> m = GOST341194() >>> m.update("foo") @@ -152,12 +152,12 @@ class GOST341194(PEP247): return GOST341194(copy(self.data), self.sbox) def update(self, data): - """ Append data that has to be hashed + """Append data that has to be hashed """ self.data += data def digest(self): - """ Get hash of the provided data + """Get hash of the provided data """ _len = 0 checksum = 0