From: Ummon Date: Wed, 26 Nov 2014 22:32:07 +0000 (+0100) Subject: Clean up. X-Git-Url: http://git.euphorik.ch/index.cgi?a=commitdiff_plain;h=ac84e8535149dbf639a7766f110960c998b47159;p=crypto_lab2.git Clean up. --- diff --git a/labo2-fsharp/CryptoFile/Crypto.fs b/labo2-fsharp/CryptoFile/Crypto.fs index 836d636..21b168e 100644 --- a/labo2-fsharp/CryptoFile/Crypto.fs +++ b/labo2-fsharp/CryptoFile/Crypto.fs @@ -75,19 +75,8 @@ module internal Crypto = let decryptor = aes.CreateDecryptor (key, iv) new CryptoStream (inputStream, decryptor, CryptoStreamMode.Read) + // Create a stream to compute the HMAC-SHA256 against all data being written. let HMACStream (key: byte[]) (outputStream: Stream) : Stream * HMACSHA256 = assert (key.Length = 32) let hmac = new HMACSHA256 (key) - new CryptoStream (outputStream, hmac, CryptoStreamMode.Write) :> Stream, hmac - - (*type HMACStream (buffer: byte[], output: Stream) = - inherit Stream () - override this.CanRead with get () = false - override this.CanSeek with get () = false - override this.CanWrite with get () = true - override this.Length with get () = raise <| new NotSupportedException () - override this.Position with get () = raise <| new NotSupportedException () - and set _ = raise <| new NotSupportedException () - override this.Flush () = - output.Flush () - override this.Read (_: byte[], _: int, _: int) = raise <| new NotSupportedException ()*) \ No newline at end of file + new CryptoStream (outputStream, hmac, CryptoStreamMode.Write) :> Stream, hmac \ No newline at end of file diff --git a/labo2-fsharp/labo2-fsharp.userprefs b/labo2-fsharp/labo2-fsharp.userprefs index 8598d4a..5aa50ca 100644 --- a/labo2-fsharp/labo2-fsharp.userprefs +++ b/labo2-fsharp/labo2-fsharp.userprefs @@ -1,16 +1,19 @@  - - + + - - - + + + + + + - - + + diff --git a/rapport/main.tex b/rapport/main.tex index 526fcc9..7e2c280 100644 --- a/rapport/main.tex +++ b/rapport/main.tex @@ -170,6 +170,9 @@ Concerne les clefs gérer à l'intérieur du container. \end{itemize} +17 Mo de mémoire et 19 s pour chiffrer un fichier de 404 Mo + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Conclusion}