-->![Decrypt maxscript mse Decrypt maxscript mse](/uploads/1/2/6/4/126400877/746992794.jpg)
![Decrypt max script free Decrypt max script free](http://www.scriptsays.com/wp-content/uploads/2016/05/Traffic-generator-for-max-8-2012.gif)
Definition
Decrypts a file that was encrypted by the current account using the Encrypt(String) method.
I know I can encrypt a stored procedure on a database once the script is present, but is there any way to insert it in an encrypted form? I don't want plain-text to be able to be intercepted across the 'wire' (or more accurately, between the SQL script executable and the server). Anarchos's status bar decrypter animates the message to display in the status bar when the visitor moves the mouse over a link. Don't just show a status bar message upon mouse over.decrypt it!
Parameters
- path
- String
A path that describes a file to decrypt.
Exceptions
The
path
parameter is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.The
path
parameter is null
.An invalid drive was specified.
The file described by the
path
parameter could not be found.An I/O error occurred while opening the file. For example, the encrypted file is already open.
-or-
This operation is not supported on the current platform.
The specified path, file name, or both exceed the system-defined maximum length.
The current operating system is not Windows NT or later.
The file system is not NTFS.
The
path
parameter specified a file that is read-only.-or-
This operation is not supported on the current platform.
-or-
The
path
parameter specified a directory.-or-
The caller does not have the required permission.
Examples
The following code example uses the Encrypt method and the Decrypt method to encrypt and then decrypt a file. The file must exist for the example to work.
Remarks
The Decrypt method allows you to decrypt a file that was encrypted using the Encrypt method. The Decrypt method can decrypt only files that were encrypted using the current user account.
![Decrypt maxscript mse Decrypt maxscript mse](/uploads/1/2/6/4/126400877/746992794.jpg)
Important
This API is only supported on Windows platforms that are able to use the NTFS Encrypting File System (EFS). Any attempt to use this on non-Windows systems, Windows Home Edition systems, or non-NTFS drives results in a PlatformNotSupportedException or NotSupportedException, depending on the situation.
Use of this API in .NET Core is not recommended; it is included to enable portability for applications that move to .NET Core but still explicitly target Windows.
![Decrypt max script free Decrypt max script free](http://www.scriptsays.com/wp-content/uploads/2016/05/Traffic-generator-for-max-8-2012.gif)
The Decrypt method requires exclusive access to the file being decrypted, and will raise an exception if another process is using the file. If the file is not encrypted, Decrypt will return a nonzero value, which indicates success.
Both the Encrypt method and the Decrypt method use the cryptographic service provider (CSP) installed on the computer and the file encryption keys of the process calling the method.
The current file system must be formatted as NTFS and the current operating system must be Windows NT or later.
Security
FileIOPermission
for permission to read and write to the file described by the
for permission to read and write to the file described by the
path
parameter. Security action: Demand. Associated enumerations: Read, Write