projects
/
crypto_lab2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ciphertext length was wrong.
[crypto_lab2.git]
/
labo2-fsharp
/
CryptoFileTests
/
Tests.fs
diff --git
a/labo2-fsharp/CryptoFileTests/Tests.fs
b/labo2-fsharp/CryptoFileTests/Tests.fs
index
aeea186
..
03b5c4a
100644
(file)
--- a/
labo2-fsharp/CryptoFileTests/Tests.fs
+++ b/
labo2-fsharp/CryptoFileTests/Tests.fs
@@
-72,7
+72,7
@@
let doSomeTests () =
| error -> assert (error :? UnableToDecryptKeys)
printfn ""
| error -> assert (error :? UnableToDecryptKeys)
printfn ""
- let cyphertextLength = (int (FileInfo (cipherFilename)).Length)
+ API.hmacSize + API.signatureSize +
API.keysSize
+ let cyphertextLength = (int (FileInfo (cipherFilename)).Length)
- API.hmacSize - API.signatureSize -
API.keysSize
printfn "== Altering the cyphertext... (%d bytes)" cyphertextLength
for i in 0 .. cyphertextLength do
printf "."
printfn "== Altering the cyphertext... (%d bytes)" cyphertextLength
for i in 0 .. cyphertextLength do
printf "."
@@
-88,4
+88,4
@@
let doSomeTests () =
File.Delete cipherFilename
File.Delete plainFilename
File.Delete cipherFilename
File.Delete plainFilename
- printfn "===== API tests OK"
+ printfn "===== API tests OK"
\ No newline at end of file