Replace AESManager by AesCryptoServiceProvider.
[crypto_lab2.git] / labo2-fsharp / CryptoFile / API.fs
index 80f3a3d..424959d 100644 (file)
@@ -36,7 +36,7 @@ module API =
         let keyAES, keyMAC, iv = Crypto.rand 32, Crypto.rand 32, Crypto.rand 16
         let fileInfo = new FileInfo (inputFilePath)
         use inputStream = fileInfo.OpenRead ()
-        use outputStream = new FileStream (outputFilePath, FileMode.Create, FileAccess.Write)
+        use outputStream = new FileStream (outputFilePath, FileMode.Create, FileAccess.Write, FileShare.Read, 4096 * 100)
         let writer = new BinaryWriter (outputStream)
 
         outputStream.Position <- 32L + 256L // Skips mac and signature. They will be written later.