mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-30 09:48:56 +00:00
better docstrings
This commit is contained in:
parent
c2fbbe4f46
commit
a36f2a8dc7
@ -56,7 +56,7 @@ decrypt_data = encrypt_data
|
||||
|
||||
def _validate_encryptor(encryptor):
|
||||
"""
|
||||
raise ValueError for `encryptor` is not a valid object
|
||||
raise ValueError if `encryptor` is not a valid object
|
||||
"""
|
||||
if not isinstance(encryptor, CipherContext):
|
||||
raise ValueError(
|
||||
@ -77,7 +77,9 @@ def _validate_key(key):
|
||||
|
||||
def _validate_iv(iv):
|
||||
"""
|
||||
confirm `iv` is a suitable initialization vector
|
||||
Returns a suitable initialiation vector. If `iv` is `None`, a
|
||||
default is returned. If `iv` is not a suitable initialization
|
||||
vector an error is raised. `iv` is returned if it valid.
|
||||
"""
|
||||
if iv is None:
|
||||
return DEFAULT_IV
|
||||
|
Loading…
Reference in New Issue
Block a user