parent
53ee4eb742
commit
89d9b8ed33
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue