Encrypt로 식에 암호 설정하고 보호하기
간단한 암호 "Shiver me timbers!"를 사용하여 메시지를 암호화하고, EncryptedObject를 얻습니다.
In[1]:=
![Click for copyable input](assets.ko/password-protect-an-expression-with-encrypt/In_22.png)
secretMessage =
Encrypt["Shiver me timbers!", "I buried a stash of gold somewhere."]
Out[1]=
![](assets.ko/password-protect-an-expression-with-encrypt/O_17.png)
이제 데이터는 암호화 되었습니다.
In[2]:=
![Click for copyable input](assets.ko/password-protect-an-expression-with-encrypt/In_23.png)
InputForm[secretMessage]
Out[2]//InputForm=
![](assets.ko/password-protect-an-expression-with-encrypt/O_18.png)
동일한 암호를 사용하여 데이터의 암호를 해독합니다.
In[3]:=
![Click for copyable input](assets.ko/password-protect-an-expression-with-encrypt/In_24.png)
Decrypt["Shiver me timbers!", secretMessage]
Out[3]=
![](assets.ko/password-protect-an-expression-with-encrypt/O_19.png)