how to hide the salt key from hardcoded code? RRS feed

  • Question

  • how to hide the salt key from the code as I have try with Azure Cloud it is working fine but I am searching for some different approaches.

    Please help me out as soon as possible.

    Monday, March 16, 2020 7:26 AM

All replies

  • Posting link to original thread so others know what you're talking about.

    Michael Taylor

    Monday, March 16, 2020 1:57 PM
  • Hi Nikita,

    Thank you for posting here.

    Actually, I don't quite understand why the salt needs to be hidden.

    In general, the salt generated by the algorithm for generating salt will be random. For example, the salt generated using RNGCryptoServiceProvider is a random byte array.

    Even if someone can get your code, the salt generated using your code won't be the same as yours.

    So why hide salt key?

    Maybe I completely misunderstood what you meant?

    In addition, if you have high security requirements, you might consider using asymmetric cryptography.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Wednesday, March 18, 2020 3:14 AM