mirror of
https://github.com/Smaug123/dotnet-classical-ciphers
synced 2025-10-05 20:48:41 +00:00
18 lines
408 B
Forth
18 lines
408 B
Forth
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 |] |]
|