mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-20 03:36:25 +00:00
more bytes clarification
This commit is contained in:
parent
e670921f56
commit
29d2e32cb0
@ -94,13 +94,13 @@ def sign_data(private_key, data):
|
|||||||
|
|
||||||
def string_from_signing_key(private_key):
|
def string_from_signing_key(private_key):
|
||||||
"""
|
"""
|
||||||
Encode a private key to a string of unicode
|
Encode a private key to a string bytes
|
||||||
|
|
||||||
:param private_key: the private part returned from
|
:param private_key: the private part returned from
|
||||||
`create_signing_keypair` or from
|
`create_signing_keypair` or from
|
||||||
`signing_keypair_from_string`
|
`signing_keypair_from_string`
|
||||||
|
|
||||||
:returns: string representing this key
|
:returns: byte-string representing this key
|
||||||
"""
|
"""
|
||||||
_validate_private_key(private_key)
|
_validate_private_key(private_key)
|
||||||
return PRIVATE_KEY_PREFIX + b2a(bytes_from_signing_key(private_key))
|
return PRIVATE_KEY_PREFIX + b2a(bytes_from_signing_key(private_key))
|
||||||
@ -186,7 +186,7 @@ def string_from_verifying_key(public_key):
|
|||||||
|
|
||||||
:param public_key: the public part of a keypair
|
:param public_key: the public part of a keypair
|
||||||
|
|
||||||
:returns: string representing this key
|
:returns: byte-string representing this key
|
||||||
"""
|
"""
|
||||||
_validate_public_key(public_key)
|
_validate_public_key(public_key)
|
||||||
return PUBLIC_KEY_PREFIX + b2a(bytes_from_verifying_key(public_key))
|
return PUBLIC_KEY_PREFIX + b2a(bytes_from_verifying_key(public_key))
|
||||||
|
Loading…
Reference in New Issue
Block a user