Run bcrypt.hash()
as an AWS Lambda function. For bcrypt.compare()
as a Lambda function, see dragonzord
.
tigerzord
uses the Lambda function interface in the following manner:
event
- The following properties are expected in theevent
argument.plainText
(string) - The value to hash.saltRounds
(number) - The number of salt rounds. This is optional, and defaults to 10.
context
- Unused.callback(err, result)
- A typical Node.js error first callback. If no error occurs,result
will be the hashed representation ofplainText
.