I’m working on a .net project where I need to securely store a double value (it’s not a password, just a numerical value) in a database. My requirement is to be able to hash the double and later “dehash” it back to its original value.
I’m aware that hashing is typically a one-way process, but in this case, I need to be able to reverse it. I understand that encryption might be more appropriate than hashing for this scenario.
Could someone provide guidance on how to accomplish this in .net? Specifically, I’d like to:
Hash a double value using a custom key.
Later, reverse this process to retrieve the original double value.
Any code examples or explanations on how to do this would be greatly appreciated!