コード例 #1
0
ファイル: crypt.py プロジェクト: DocVaughan/Pythonista
    def aes_decrypt(self,key, chunksize=64*1024):
        self.out_filename = self.out_filename or os.path.splitext(self.in_filename)[0]
        aes = AesKey(key)

        with open(self.in_filename, 'rb') as infile:
            with open(self.out_filename, 'wb') as outfile:
                outfile.write(aes.decrypt_raw(infile.read()))
コード例 #2
0
ファイル: crypt.py プロジェクト: betoborda/Pythonista
    def aes_decrypt(self, key, chunksize=64 * 1024):
        self.out_filename = self.out_filename or os.path.splitext(
            self.in_filename)[0]
        aes = AesKey(key)

        with open(self.in_filename, 'rb') as infile:
            with open(self.out_filename, 'wb') as outfile:
                outfile.write(aes.decrypt_raw(infile.read()))
コード例 #3
0
ファイル: crypt.py プロジェクト: betoborda/Pythonista
 def aes_encrypt(self, key=None, chunksize=64 * 1024):
     self.out_filename = self.out_filename or self.in_filename + '.enc'
     aes = AesKey(key)
     with open(self.in_filename, 'rb') as infile:
         with open(self.out_filename, 'wb') as outfile:
             outfile.write(aes.encrypt_raw(infile.read()))
コード例 #4
0
ファイル: crypt.py プロジェクト: DocVaughan/Pythonista
 def aes_encrypt(self,key=None, chunksize=64*1024):
     self.out_filename = self.out_filename or self.in_filename+'.enc'
     aes = AesKey(key)
     with open(self.in_filename, 'rb') as infile:
         with open(self.out_filename, 'wb') as outfile:
             outfile.write(aes.encrypt_raw(infile.read()))