public void Init() { Aes aes = AESEncryptor.CreateAES("DotnetDownloadConfig"); byte[] iv = ByteHelper.ParseHexString("0102030405060708090a0a0c0d010208"); _fileEncryptor = new AESEncryptor(aes.Key, iv); }
public void Init() { Aes _newAES = AESEncryptor.CreateAES("yanzhiweizhuzhouhunanchina"); _newAES.IV = new byte[16] { 0x01, 0x02, 0x03, 0x4, 0x05, 0x06, 0x07, 0x08, 0x01, 0x02, 0x03, 0x4, 0x05, 0x06, 0x07, 0x08 }; aesHelper = new AESEncryptor(_newAES.Key, _newAES.IV); }
/// <summary> /// 构造函数 /// </summary> public DownloadFileContext() { var aes = AESEncryptor.CreateAES(DownloadConfigContext.FileNameEncryptorKey); _fileEncryptor = new AESEncryptor(aes.Key, DownloadConfigContext.FileNameEncryptorIv); }
static DownloadFileHelper() { Aes _Aes = AESEncryptor.CreateAES(DownloadConfigContext.FileNameEncryptorKey); fileEncryptorHelper = new AESEncryptor(_Aes.Key, DownloadConfigContext.FileNameEncryptorIv); }