Skip to content

Commit

Permalink
Merge pull request #1 from tsunamaru/main
Browse files Browse the repository at this point in the history
Python >=3.9 fix
  • Loading branch information
li0ard authored Oct 19, 2022
2 parents 79837e3 + 1af1e63 commit d4a1252
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 d4a1252

Please sign in to comment.