❔ c# .net6 cryptograpy example
Hello.
I'm searching for an example for encryption.
I already looked at: https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.aes?view=net-6.0
I copied the example and I can overwrite the aeskey. However I can only use exactly 32 characters more or less are not allowed.
ofcourse I kan add or remove characters to get to exactly 32. But I search for a good example where you can add any password /. key
Hope some can help
Aes Class (System.Security.Cryptography)
Represents the abstract base class from which all implementations of the Advanced Encryption Standard (AES) must inherit.
5 Replies
generally you don't use the raw string as a key, rather you derive a hash that is fixed in size from that key then use that as a key
additionally you also "salt" the password - add some extra data that is other than the password you're using so that the original password can be estimated by means of a dictionary attack
Yes, The hash with a fixed length to encrypt and decrypt solved the issue
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Use the /close command to mark a forum thread as answered
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.