use decrypt aliases

This commit is contained in:
meejah 2019-06-24 16:55:16 -06:00
parent 2c5cbbb095
commit 238f604bf5

View File

@ -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):