Encrypt attribute

How does a filter driver detect when the Encrypt attribute of a file is set by the user?