示例#1
0
 def decrypt(self, data):
     """
     Decrypt, then unpad, the given data with AES-CTR.
     """
     return BlockCipher.unpad(self.cipher.decrypt(data))
示例#2
0
 def encrypt(self, data):
     """
     Pad, then encrypt, the given data with AES-CTR.
     """
     return self.cipher.encrypt(BlockCipher.pad(data))