NeatUpload Documentation

ObjectProtector.Protect Method (Object, Byte[], Byte[])

Converts an object tree to a secure string.

public static string Protect(
   object objectToSerialize,
   byte[] encryptionKey,
   byte[] validationKey
);

Parameters

objectToSerialize
the object at the root of the object tree to protect.
encryptionKey
the key to use to encrypt the object
validationKey
ignored

Return Value

a secure string that can be passed to Unprotect to retrieve the original object.

Remarks

The encryption key is used to encrypt the serialized object and sign it, respectively. It 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