Best Secure way to encrypt and decrypt

Jassim Al Rahma 1,531 Reputation points
2022-10-31T19:54:50.473+00:00

Hi,

What's the best secure way to encrypt and decrypt a string with C#?

What's your advise..

Thanks,
Jassim

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,408 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AgaveJoe 26,246 Reputation points
    2022-10-31T20:18:19.143+00:00

    Encryption is a vast subject. .NET has an entire namespace dedicated to cryptography. The best approach is a decision you need to make depending on your unknown requirements. Read the docs, learn a few things, and pick a method.

    .NET cryptography model

    Security is a different subject and since we have no idea what you're doing it's fruitless to guess.

    Secure coding guidelines