Compare commits

..
1 Commits
Author SHA1 Message Date
KKlochko becb168e0c Update the FrequencyAnalyzer to use the frequency string instead.
continuous-integration/drone/push Build is failing
2023-10-12 22:07:02 +03:00
2 changed files with 3 additions and 5 deletions
+2 -4
View File
@@ -122,10 +122,8 @@
(defn set-symbols (defn set-symbols
"Set defaults symbols for a language." "Set defaults symbols for a language."
[options] [options]
(if (contains? options :language) (set-option options :symbols
(set-option options :symbols (sf/default-symbol-factory (:language options))))
(sf/default-symbol-factory (:language options)))
options))
(defn load-and-set-option (defn load-and-set-option
"Load the option and set it." "Load the option and set it."
@@ -79,7 +79,7 @@
ciphertext "bca" ciphertext "bca"
key 1 key 1
symbols "abc" symbols "abc"
frequencies "etaoinsrhldcumfpgwybvkxjqz"] frequencies sf/english-letter-frequencies]
(testing "The ciphertext is 'bca' and key is 1." (testing "The ciphertext is 'bca' and key is 1."
(is (= plaintext (is (= plaintext
(frequency-analizer-get-plaintext ciphertext symbols frequencies)))))) (frequency-analizer-get-plaintext ciphertext symbols frequencies))))))