1

There is this password hasher in java that was used for a java application.

public void Bcrypt () {
    
   final String password   =  "akwetey12345661";
   String hashedPwd  = BCrypt.hashpw(password, BCrypt.gensalt());
   final boolean t  = BCrypt.checkpw(password,hashedPwd);
   System.out.println("confirm encryption = " + t); 
}

Now, I have an application in ASP.NET Core Web API that wants to access the DB that the application is using.

How do I convert it to ASP.NET Core, so that users can Login into the DB using ASP.NET Core instead of the Java?

Thanks

Ayobamilaye
  • 1,099
  • 1
  • 17
  • 46
  • 1
    There's at least these two libraries you can try: https://www.nuget.org/packages/BCrypt.Net-Next and https://github.com/neoKushan/BCrypt.Net-Core – juunas Oct 10 '22 at 10:27
  • @juunas - The issue is that the password has already been hashed with Java using bcrypt as shown in my code above. How do I allow users to login into the DB using .NET Core Web Api – Ayobamilaye Oct 10 '22 at 11:03
  • Does this answer your question? [Hash Password in C#? Bcrypt/PBKDF2](https://stackoverflow.com/questions/11412882/hash-password-in-c-bcrypt-pbkdf2) – BurnsBA Oct 10 '22 at 14:41

0 Answers0