X-Git-Url: http://git.euphorik.ch/?p=crypto_lab2.git;a=blobdiff_plain;f=labo2-fsharp%2FCryptoFile%2FAPI.fs;fp=labo2-fsharp%2FCryptoFile%2FAPI.fs;h=424959da80403c3b1bb88ad0fcfcfa29f687f154;hp=80f3a3d580c5a6e5fe18812ace25ed4bc50dca97;hb=2fcf3ed38874e9aa6d2ccd6b9917bd3113d76aee;hpb=0508ca9ddb817b14ca747f8736ea1960cb70d2e7 diff --git a/labo2-fsharp/CryptoFile/API.fs b/labo2-fsharp/CryptoFile/API.fs index 80f3a3d..424959d 100644 --- a/labo2-fsharp/CryptoFile/API.fs +++ b/labo2-fsharp/CryptoFile/API.fs @@ -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.