ObjectProtector.Protect Method (Object, Byte[], Byte[], String, String)
Converts an object tree to a secure string.
Parameters
-
objectToSerialize
- the object at the root of the object tree to protect.
-
encryptionKey
- the key to use to encrypt the object
-
validationKey
- ignored
-
encryptionAlgorithm
- the name of the encryption algorithm to use, null means use default
-
validationAlgorithm
- the name of the signing algorithm to use, null means use default
Return Value
a secure string that can be passed to Unprotect to retrieve the original object.
Remarks
The encryption key and algorithms are used to encrypt the serialized object. They must have the same values when Unprotect is called or an exception will occur.
See Also
ObjectProtector Class | Brettle.Web.NeatUpload Namespace | ObjectProtector.Protect Overload List