warner/pycryptopp — comment on commit b0dda55de9969aec7cf2abe5cc2c0915a7153249
File: pycryptopp/publickey/ed25519/keys.py line 59
By davidsarah:

The error when len(s_ascii)%4 == 1 might be confusing. I suggest:

length = len(s_ascii)
assert length%4 != 1, "bad length %d" % (length,)
s_ascii += "="*{0:0, 2:2, 3:1}[length%4]