X-Git-Url: http://www.git.cypherpunks.ru/?p=pygost.git;a=blobdiff_plain;f=pygost%2Fgost28147.py;h=b7fc0f46634d5589cb41b3bdef10feff8d2e4c84;hp=25c0f506a28d35b00fefc5e38c7416a6054d49f9;hb=744398c0b6a3ab223d91cbf56a72932a7c87381d;hpb=313eaab6514eff3ce3d1e4bee615eb38299c2f89 diff --git a/pygost/gost28147.py b/pygost/gost28147.py index 25c0f50..b7fc0f4 100644 --- a/pygost/gost28147.py +++ b/pygost/gost28147.py @@ -181,8 +181,8 @@ def ns2block(ns): """ n1, n2 = ns return bytes(bytearray(( - (n2 >> 0) & 255, (n2 >> 8) & 255, (n2 >> 16) & 255, (n2 >> 24) & 255, - (n1 >> 0) & 255, (n1 >> 8) & 255, (n1 >> 16) & 255, (n1 >> 24) & 255, + (n2 >> 0) & 0xFF, (n2 >> 8) & 0xFF, (n2 >> 16) & 0xFF, (n2 >> 24) & 0xFF, + (n1 >> 0) & 0xFF, (n1 >> 8) & 0xFF, (n1 >> 16) & 0xFF, (n1 >> 24) & 0xFF, )))