Compare commits

..
2 Commits
Author SHA1 Message Date
KKlochko 79b72fccca Fix the key parsing in the gamma actions. 2023-10-31 16:49:30 +02:00
KKlochko 5843695a40 Add the action of decryption for the gamma cipher. 2023-10-31 16:48:40 +02:00
@@ -44,12 +44,15 @@
[options arguments action-type]
(let [message (:message options)
key (->> (cs/split (:key options) #",")
(map #(Integer/parseInt %)))
(map #(Integer/parseInt %))
(into []))
symbols (:symbols options)]
(cond
(= action-type :encrypt)
(gamma/encrypt-message key symbols message)
)))
(= action-type :decrypt)
(gamma/decrypt-message key symbols message))))
(defn cryptography-actions
[options arguments action-type]