How to create simple login with encrypted password WPF,WCF

B M-A 241 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,

Windows Communication Foundation
Windows Communication Foundation
A Microsoft runtime and set of application programming interfaces in the .NET Framework for building service-oriented applications.
284 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,359 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.
8,141 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 35,416 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.