Compare commits
2
Commits
becb168e0c
..
0.6.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac2cf2ac58 | ||
|
|
043257bb64 |
@@ -122,8 +122,10 @@
|
|||||||
(defn set-symbols
|
(defn set-symbols
|
||||||
"Set defaults symbols for a language."
|
"Set defaults symbols for a language."
|
||||||
[options]
|
[options]
|
||||||
(set-option options :symbols
|
(if (contains? options :language)
|
||||||
(sf/default-symbol-factory (:language options))))
|
(set-option options :symbols
|
||||||
|
(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 sf/english-letter-frequencies]
|
frequencies "etaoinsrhldcumfpgwybvkxjqz"]
|
||||||
(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))))))
|
||||||
|
|||||||
Reference in New Issue
Block a user