-
-
Save hxalid/f630948b5aa33429e88868fc726e2c0a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class bcrypt | |
{ | |
[FunctionName("bcrypt")] | |
public static async Task<IActionResult> Run( | |
[HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req, | |
ILogger log) | |
{ | |
string requestBody = await new StreamReader(req.Body).ReadToEndAsync(); | |
var hashedPassword = BCrypt.Net.BCrypt.HashPassword(requestBody); | |
return (ActionResult)new OkObjectResult(hashedPassword); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment