Update the FrequencyAnalyzer to use the frequency string instead.
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-10-12 22:10:41 +03:00
parent de35d4e2d3
commit 043257bb64
3 changed files with 6 additions and 4 deletions
@@ -50,10 +50,10 @@
(defn frequency-analizer-get-plaintext
"Return the plaintext from a ciphertext using simple analizer. The function is case-insensitive."
[ciphertext symbols letter-frequences]
[ciphertext symbols letter-frequencies-string]
(let [decrypt (reify Decrypted
(decrypt [this message key symbols]
(caesar/decrypt-message message key symbols)))]
(-> (new FrequencyAnalyzer ciphertext symbols letter-frequences decrypt)
(-> (new FrequencyAnalyzer ciphertext symbols letter-frequencies-string decrypt)
.crack)))