Projet

Général

Profil

0003-python3-struct-unpack-C-strings-into-Python-bytes-31.patch

Paul Marillonnet, 18 avril 2019 14:19

Télécharger (974 octets)

Voir les différences:

Subject: [PATCH 3/4] python3: struct-unpack C strings into Python bytes
 (#31171)

 src/authentic2/crypto.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/authentic2/crypto.py
133 133
            magic, mode, count = struct.unpack('<2sBH', raw[:5])
134 134
        except struct.error as e:
135 135
            raise DecryptionError('invalid packing', e)
136
        if magic != 'a2':
136
        if magic != b'a2':
137 137
            raise DecryptionError('invalid magic string', magic)
138 138
        if mode != 1:
139 139
            raise DecryptionError('mode is not AES128-SHA256', mode)
140
-