module FortyTwo.Renderers.Password (renderPassword, hideLetters) where

import FortyTwo.Constants (passwordHiddenChar)

-- | Print the password value to the user hiding it
renderPassword :: String -> IO ()
renderPassword :: String -> IO ()
renderPassword String
letters = String -> IO ()
putStr forall a b. (a -> b) -> a -> b
$ String -> String
hideLetters String
letters

-- | Hide any string replacing its letters with the passwordHiddenChar
hideLetters :: String -> String
hideLetters :: String -> String
hideLetters String
letters = [Char
passwordHiddenChar | Char
_ <- String
letters]