mirror of
https://github.com/romanz/amodem.git
synced 2026-03-27 21:39:06 +08:00
gpg: comment about digest size
This commit is contained in:
@@ -66,6 +66,7 @@ def open_connection(keygrip_bytes):
|
||||
def pksign(keygrip, digest, algo):
|
||||
"""Sign a message digest using a private EC key."""
|
||||
assert algo == b'8', 'Unsupported hash algorithm ID {}'.format(algo)
|
||||
assert len(digest) == 64 # SHA-256 bits (in hex digits)
|
||||
keygrip_bytes = binascii.unhexlify(keygrip)
|
||||
with open_connection(keygrip_bytes) as conn:
|
||||
r, s = conn.sign(binascii.unhexlify(digest))
|
||||
|
||||
Reference in New Issue
Block a user