internal FileExchangeV3FileDownloadInformation(CGetExtendedUpdateInfo2Response.FileLocation fileLocation) { DownloadUrl = fileLocation.Url; if (!string.IsNullOrEmpty(fileLocation.EsrpDecryptionInformation)) { EsrpDecryptionInformation = EsrpDecryptionInformation.DeserializeFromJson(fileLocation.EsrpDecryptionInformation); } Digest = fileLocation.FileDigest; }
public EsrpDecryptor(EsrpDecryptionInformation esrp) { this.esrp = esrp; key = new byte[32]; Array.Copy(Convert.FromBase64String(esrp.KeyData), 0, key, 0, 32); aes = Aes.Create(esrp.AlgorithmName); aes.Mode = CipherMode.CBC; aes.Key = key; aes.Padding = PaddingMode.None; }