mirror of
https://github.com/Smaug123/dotnet-classical-ciphers
synced 2025-10-15 17:38:40 +00:00
Initial commit
This commit is contained in:
17
CipherSuite.Test/TestMonoalphabetic.fs
Normal file
17
CipherSuite.Test/TestMonoalphabetic.fs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace CipherSuite.Test
|
||||
|
||||
open CipherSuite
|
||||
open NUnit.Framework
|
||||
open FsUnitTyped
|
||||
|
||||
[<TestFixture>]
|
||||
module TestMonoalphabetic =
|
||||
|
||||
[<Test>]
|
||||
let ``Challenge 1A`` () =
|
||||
let rand = System.Random 10
|
||||
|
||||
let key, _plain, _fitness =
|
||||
Monoalphabetic.crack rand 20000 (String.stripNonAlpha Examples.challenge1A)
|
||||
|
||||
key |> shouldEqual [| yield! [| 19..25 |] ; yield! [| 0..18 |] |]
|
Reference in New Issue
Block a user