public RijndaelDecryptTransformVM(string filePath, string decryptFilePath, byte[] key, Rijndael_.Size blockSize, byte[] IV, Rijndael_.Mode mode, bool isDeleteAfter) : base(isDeleteAfter, CryptoDirection.Decrypt) { CryptoName = "Rijndael"; SourceFilePath = filePath; DestFilePath = decryptFilePath; Start(Rijndael_.Get(key, blockSize, IV, mode, CryptoDirection.Decrypt)); }
public RijndaelDecryptTransformVM(string filePath, string decryptFilePath, byte[] key, Rijndael_.Size blockSize, bool isDeleteAfter, bool multithread = false) : base(isDeleteAfter, CryptoDirection.Decrypt) { CryptoName = "Rijndael"; SourceFilePath = filePath; DestFilePath = decryptFilePath; if (multithread) { StartMultithread(Rijndael_.GetNice(key, blockSize, CryptoDirection.Decrypt)); } else { Start(Rijndael_.Get(key, blockSize, CryptoDirection.Decrypt)); } }
public void Test4_OFB() { for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { Func <ICryptoTransform> getEncryptor = () => Rijndael_.Get(_keys[i], (Rijndael_.Size)j, _iv[j], Rijndael_.Mode.OFB, CryptoDirection.Encrypt); Func <ICryptoTransform> getDecryptor = () => Rijndael_.Get(_keys[i], (Rijndael_.Size)j, _iv[j], Rijndael_.Mode.OFB, CryptoDirection.Decrypt); General.Check(getEncryptor, getDecryptor, 10_001); General.Check(getEncryptor, getDecryptor, 0); General.Check(getEncryptor, getDecryptor, 7); } } }