Created
November 24, 2017 19:02
-
-
Save paulbatum/70b269f83fddca7524bdce37d48a00fd to your computer and use it in GitHub Desktop.
Functions Tiered Jit Test
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
using System.IO; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Azure.WebJobs; | |
using Microsoft.Azure.WebJobs.Extensions.Http; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.Azure.WebJobs.Host; | |
using Newtonsoft.Json; | |
namespace TieredJitTest | |
{ | |
public static class BCryptTest | |
{ | |
[FunctionName("BCryptTest")] | |
public static IActionResult Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)]HttpRequest req, TraceWriter log) | |
{ | |
string password = req.Query["password"]; | |
string salt = BCrypt.Net.BCrypt.GenerateSalt(); | |
string hash = BCrypt.Net.BCrypt.HashPassword(password, salt); | |
return new OkObjectResult(hash); | |
} | |
} | |
} |
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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>netstandard2.0</TargetFramework> | |
<AzureFunctionsVersion>v2</AzureFunctionsVersion> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="BCrypt.Net-Next" Version="2.1.2" /> | |
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.6" /> | |
</ItemGroup> | |
<ItemGroup> | |
<None Update="host.json"> | |
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
</None> | |
<None Update="local.settings.json"> | |
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
<CopyToPublishDirectory>Never</CopyToPublishDirectory> | |
</None> | |
</ItemGroup> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment