DecryptFile

DecryptFile["password",file]

generates a decrypted version of a file, using the specified password.

DecryptFile["password",source,target]

generates a decrypted version of source, putting the result in target.

DecryptFile[keyspec,source,]

decrypts using the cryptographic key specification keyspec.

Details and Options

Examples

open allclose all

Basic Examples  (4)

Write a string to the file tmp.txt:

In[1]:=
Click for copyable input

Encrypt the file tmp.txt using a password:

In[2]:=
Click for copyable input
Out[2]=

Delete the original file:

In[3]:=
Click for copyable input

Decrypt the encrypted file:

In[4]:=
Click for copyable input
Out[4]=

Read the decrypted file:

In[5]:=
Click for copyable input
Out[5]=

Delete the files used in this example:

In[6]:=
Click for copyable input

Encrypt a file containing an image, putting the result in a new file:

In[1]:=
Click for copyable input
Out[1]=

Decrypt the encrypted file, again putting the result in a new file:

In[2]:=
Click for copyable input
Out[2]=

Import the decrypted file:

In[3]:=
Click for copyable input
Out[3]=

Delete the files used in this example:

In[4]:=
Click for copyable input

Create a cloud object:

In[1]:=
Click for copyable input
Out[1]=

Encrypt the cloud object, getting back another cloud object:

In[2]:=
Click for copyable input
Out[2]=

Decrypt the encrypted cloud object, getting back yet another cloud object:

In[3]:=
Click for copyable input
Out[3]=

Get the contents of the file decrypted cloud object:

In[4]:=
Click for copyable input
Out[4]=

Create an archive file from a directory:

In[1]:=
Click for copyable input
Out[1]=

Encrypt the archive file:

In[2]:=
Click for copyable input
Out[2]=

Delete the original archive:

In[3]:=
Click for copyable input

Decrypt the encrypted archive:

In[4]:=
Click for copyable input
Out[4]=

Extract the archive into the current directory:

In[5]:=
Click for copyable input

Delete the extracted directory and intermediate files used in this example:

In[6]:=
Click for copyable input
In[7]:=
Click for copyable input

Scope  (2)

Options  (2)

Possible Issues  (2)

See Also

EncryptFile  Decrypt  SymmetricKey  GenerateSymmetricKey  GenerateAsymmetricKeyPair

Introduced in 2017
(11.1)