HasswordManager/test/Spec.hs
2024-05-26 15:34:09 +02:00

13 lines
452 B
Haskell

import Test.Hspec
import qualified Crypto as Cr
main :: IO ()
main = hspec $ do
describe "Crypto" $ do
it "should encrypt and decrypt a message correctly" $ do
let originalMessage = "Hello, World!"
masterPassword = "mysecretpassword"
encryptedMessage = Cr.encrypt' masterPassword originalMessage
decryptedMessage = Cr.decrypt' masterPassword encryptedMessage
decryptedMessage `shouldBe` originalMessage