Table of Contents
dd()
is essentially adding a break point in your code which dumps the properties of an object to your browser.
This proc is only available in develop mode.
proc dd(outputs:varges[string, `$`])
var a = %*{
"key1": "value1",
"key2": "value2",
"key3": "value3",
"key4": "value4",
}
dd(a, "abc", request.repr)
Basolato has its own useful password library. It uses bcrypt
package inside.
https://github.com/runvnc/bcryptnim
proc genHashedPassword*(val:string):string =
proc isMatchPassword*(input, hashedPassword:string):bool =
import basolato/password
let pass1 = "Password!"
let pass2 = "Password!"
let pass3 = "WrongPassword"
let hashed = genHashedPassword(pass1)
echo isMatchPassword(pass2, hashed)
>> true
echo isMatchPassword(pass3, hashed)
>> false