I am serializing an object and saving this object to file. In this process I am using a CryptoStream to encrypt the object with a password. My question is this: What is the best way to check if the password is correct or not?
Should I just check for the error number to see if it is the number returned when an incorrect password as used, or is there a specific function that can be used to determine if the correct password has been used?
Should I just check for the error number to see if it is the number returned when an incorrect password as used, or is there a specific function that can be used to determine if the correct password has been used?