fixed aes support

--HG--
branch : pmacs2
This commit is contained in:
moculus 2007-07-08 20:00:28 +00:00
parent 53ee4eb742
commit 89d9b8ed33
1 changed files with 4 additions and 4 deletions

View File

@ -454,11 +454,11 @@ class FileBuffer(Buffer):
self.save()
class AesBuffer(FileBuffer):
def __init__(self, path, password, nl='\n'):
def __init__(self, path, password, nl='\n', name=None):
'''fb = FileBuffer(path)'''
FileBuffer.__init__(self, path, nl)
FileBuffer.__init__(self, path, nl, name)
self.password = password
def read_filter(self, data):
return aes.decrypt(data, self.password)
return aes.decrypt_data(data, self.password)
def write_filter(self, data):
return aes.encrypt(data, self.password)
return aes.encrypt_data(data, self.password)