parent
53ee4eb742
commit
89d9b8ed33
|
@ -454,11 +454,11 @@ class FileBuffer(Buffer):
|
||||||
self.save()
|
self.save()
|
||||||
|
|
||||||
class AesBuffer(FileBuffer):
|
class AesBuffer(FileBuffer):
|
||||||
def __init__(self, path, password, nl='\n'):
|
def __init__(self, path, password, nl='\n', name=None):
|
||||||
'''fb = FileBuffer(path)'''
|
'''fb = FileBuffer(path)'''
|
||||||
FileBuffer.__init__(self, path, nl)
|
FileBuffer.__init__(self, path, nl, name)
|
||||||
self.password = password
|
self.password = password
|
||||||
def read_filter(self, data):
|
def read_filter(self, data):
|
||||||
return aes.decrypt(data, self.password)
|
return aes.decrypt_data(data, self.password)
|
||||||
def write_filter(self, data):
|
def write_filter(self, data):
|
||||||
return aes.encrypt(data, self.password)
|
return aes.encrypt_data(data, self.password)
|
||||||
|
|
Loading…
Reference in New Issue