Wolfram Language & System 10.4 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

Decrypt

Decrypt["password",enc]
attempts to decrypt the encrypted object enc using the specified password.

Decrypt[keyspec,enc]
attempts to decrypt using the cryptographic key specification keyspec.

Decrypt[key,bytes]
attempts to decrypt the ByteArray object bytes, to give another ByteArray object.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Encrypt a message with a password:

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

Decrypt with the same password to get back the message:

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

Generate a key:

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

Encrypt using the key:

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

Decrypt using the key:

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

Generate public and private keys:

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

Encrypt using the public key:

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

Decrypt using the private key:

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

Alternatively, encrypt using the private key:

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

Now decrypt using the public key:

In[5]:=
Click for copyable input
Out[5]=
Introduced in 2015
(10.1)