def encrypt(self, data): """ encrypt data with convergence encryption. Args data: str, the plain text to be encrypted Returns key: hash(block), encryption key id: hash(hash(block), block ID ciphertext: enc(key, block) """ assert(isinstance(data, str)) key, id = self.__sec_key(data) return key, id, aes(key, data)