úÎ!Ar?     (c) Dennis Gosnell, 2019BSD-style (see LICENSE file)cdep.illabout@gmail.com experimentalPOSIXNoneM> passwordTThe result of a checking a password against a hashed version. This is returned by .passwordYThe password check was successful. The plain-text password matches the hashed password.passwordXThe password check failed. The plain-text password does not match the hashed password.passwordA hashed password.zThis represents a password that has been put through a hashing function. The hashed password can be stored in a database. passwordA plain-text password./This represents a plain-text password that has NOT been hashed.You should be careful with  @. Make sure not to write it to logs or store it in a database. password?This is an unsafe function that shows a password in plain-text.&unsafeShowPasswordText $ Pass "foobar""foobar"+You should generally not use this function.password This is like   but produces a  instead of a .password Convert an  Crypto.Scrypt. to our   type. passToScryptPass $ Pass "foobar"Pass {getPass = "foobar"}password Convert an  Crypto.Scrypt.  to our  type.This is the opposite of !.2let salt = Salt "abcdefghijklmnopqrstuvwxyz012345"let pass = Scrypt.Pass "foobar"7let encryptedPass = encryptPass defaultParams salt pass encryptedPass±EncryptedPass {getEncryptedPass = "14|8|1|YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU=|nENDaqWBmPKapAqQ3//H0iBImweGjoTqn5SvBS8Mc9FPFbzq6w65maYPZaO+SPamVZRXQjARQ8Y+5rhuDhjIhw=="}+scryptEncryptedPassToPassHash encryptedPass¦PassHash {unPassHash = "14|8|1|YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU=|nENDaqWBmPKapAqQ3//H0iBImweGjoTqn5SvBS8Mc9FPFbzq6w65maYPZaO+SPamVZRXQjARQ8Y+5rhuDhjIhw=="}RscryptEncryptedPassToPassHash (passHashToScryptEncryptedPass passHash) == passHash!password Convert out  type to  Crypto.Scrypt. .This is the opposite of .2let salt = Salt "abcdefghijklmnopqrstuvwxyz012345"let pass = Scrypt.Pass "foobar"7let encryptedPass = encryptPass defaultParams salt pass encryptedPass±EncryptedPass {getEncryptedPass = "14|8|1|YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU=|nENDaqWBmPKapAqQ3//H0iBImweGjoTqn5SvBS8Mc9FPFbzq6w65maYPZaO+SPamVZRXQjARQ8Y+5rhuDhjIhw=="}+scryptEncryptedPassToPassHash encryptedPass¦PassHash {unPassHash = "14|8|1|YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU=|nENDaqWBmPKapAqQ3//H0iBImweGjoTqn5SvBS8Mc9FPFbzq6w65maYPZaO+SPamVZRXQjARQ8Y+5rhuDhjIhw=="}PpassHashToScryptEncryptedPass (scryptEncryptedPassToPassHash encPass) == encPasspassword Just like , but generate a new  everytime with a call to .hashPass (Pass "foobar")(PassHash {unPassHash = "14|8|1|...|..."}passwordHash a password with the given .The resulting 5 has the parameters used to hash it, as well as the  appended to it, separated by |. The input  and resulting  are both byte-64 encoded.2let salt = Salt "abcdefghijklmnopqrstuvwxyz012345"%hashPassWithSalt (Pass "foobar") salt¦PassHash {unPassHash = "14|8|1|YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU=|nENDaqWBmPKapAqQ3//H0iBImweGjoTqn5SvBS8Mc9FPFbzq6w65maYPZaO+SPamVZRXQjARQ8Y+5rhuDhjIhw=="}(Note that we use an explicit d in the example above. This is so that the example is reproducible, but in general you should use .  generates a new  everytime it is called.)>This function uses the hash function from the scrypt package: ".passwordCheck a   against a .Returns  on success.2let salt = Salt "abcdefghijklmnopqrstuvwxyz012345"let pass = Pass "foobar")let passHash = hashPassWithSalt pass saltcheckPass pass passHash PassCheckSuccReturns  If an incorrect   or  is used.'let badpass = Pass "incorrect-password"checkPass badpass passHash PassCheckFail:This should always fail if an incorrect password is given.…\(Blind badpass) -> let correctPassHash = hashPassWithSalt (Pass "foobar") salt in checkPass badpass correctPassHash == PassCheckFail    Safe>ë#$%&'()*+        !"# $%&'()*+,-./0'password-0.1.0.0-D01pb2ShpOu69Ty5IPN1y0 Data.PasswordPaths_password#scrypt-0.5.0-BiMmpB0GagQCbASLAeqMVC Crypto.ScryptnewSaltgetSaltSalt PassCheck PassCheckSucc PassCheckFailPassHash unPassHashPassunPassunsafeShowPasswordunsafeShowPasswordTexthashPasshashPassWithSalt checkPass$fIsStringPass $fReadPass $fEqPassHash $fOrdPassHash$fReadPassHash$fShowPassHash $fEqPassCheck$fReadPassCheck$fShowPassCheck text-1.2.3.1Data.Text.InternalTextbaseGHC.BaseStringpassToScryptPassscryptEncryptedPassToPassHash EncryptedPasspassHashToScryptEncryptedPass encryptPassversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName