Best Secure way to encrypt and decrypt

Jassim Al Rahma 1,616 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.
11,558 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AgaveJoe 30,126 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


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.