How to create simple login with encrypted password WPF,WCF

B M-A 361 Reputation points
2022-10-25T20:07:04.437+00:00

Hello,
I have an WPF application that read data from a WCF service (Net.TCP protocol).
At this moment Client application and WCF service are hosted on intranet, but I want to automatically encrypt password when a new user is created.
How to encrypt password when a new user is created an how to decrypt password when user try to login?

Best regards,

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,625 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,710 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,629 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 61,266 Reputation points
    2022-10-26T01:11:57.763+00:00

    Generally for passwords you use a stable hash rather than encryption. To check a password string you hash the string and compare to the stored value.

    This has the advantage that passwords can not be stolen, as they are not stored.