mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-24 07:06:41 +00:00
use decrypt aliases
This commit is contained in:
parent
2c5cbbb095
commit
238f604bf5
@ -331,11 +331,8 @@ class DirectoryNode(object):
|
|||||||
salt = encwrcap[:16]
|
salt = encwrcap[:16]
|
||||||
crypttext = encwrcap[16:-32]
|
crypttext = encwrcap[16:-32]
|
||||||
key = hashutil.mutable_rwcap_key_hash(salt, self._node.get_writekey())
|
key = hashutil.mutable_rwcap_key_hash(salt, self._node.get_writekey())
|
||||||
# XXX uhm, so maybe this is confusing even if it's what the
|
encryptor = aes.create_decryptor(key)
|
||||||
# original code was doing; worth making a aes.decrypt_data
|
plaintext = aes.decrypt_data(encryptor, crypttext)
|
||||||
# just to be more clear?
|
|
||||||
encryptor = aes.create_encryptor(key)
|
|
||||||
plaintext = aes.encrypt_data(encryptor, crypttext)
|
|
||||||
return plaintext
|
return plaintext
|
||||||
|
|
||||||
def _create_and_validate_node(self, rw_uri, ro_uri, name):
|
def _create_and_validate_node(self, rw_uri, ro_uri, name):
|
||||||
|
Loading…
Reference in New Issue
Block a user