def wrap_header(self, base_hdr): iv = os.urandom(16) self.__iv = iv seq = [base_hdr, self.__const_fill] e_data = aes_cfb.encrypt(self.__key, self.__iv, b"".join(seq)) return iv + e_data
def wrap_header(self, base_hdr): iv = os.urandom(16) self.__iv = iv seq = [ base_hdr, self.__const_fill ] e_data = aes_cfb.encrypt(self.__key, self.__iv, b"".join(seq)) return iv + e_data
def wrap_body(self, size, body_data): filled = bytes(aes_cfb.get_size(size) - size) return aes_cfb.encrypt(self.__key, self.__iv, body_data + filled)
def wrap_body(self, size, body_data): return aes_cfb.encrypt(self.__key, self.__iv, body_data)