Preparing encryption of data