Skip to content

Commit

Permalink
Python >=3.9 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tsunamaru committed Oct 17, 2022
1 parent 79837e3 commit 1af1e63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gost2012.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def encodeKey(key, oids, algo="1.2.643.7.1.1.1.1"):
seq2,
pyasn1.type.univ.OctetString(bytes.fromhex(key))
)
return '-----BEGIN PRIVATE KEY-----\n{}-----END PRIVATE KEY-----\n'.format(base64.encodestring(encode(seq3)).decode("ascii"))
return '-----BEGIN PRIVATE KEY-----\n{}-----END PRIVATE KEY-----\n'.format(base64.encodebytes(encode(seq3)).decode("ascii"))

def unwrap_gost(kek, data, sbox=DEFAULT_SBOX):
if len(data) != 44:
Expand Down

0 comments on commit 1af1e63

Please sign in to comment.