16e7c69efSopenharmony_ci# Cipher 26e7c69efSopenharmony_ci 36e7c69efSopenharmony_ci### Introduction 46e7c69efSopenharmony_ci 56e7c69efSopenharmony_ciThis sample shows how to use cipher algorithms, including Rivest-Shamir-Adleman (RSA) and Advanced Encryption Standard (AES). The display effect is as follows: 66e7c69efSopenharmony_ci 76e7c69efSopenharmony_ci   86e7c69efSopenharmony_ci 96e7c69efSopenharmony_ci### Concepts 106e7c69efSopenharmony_ci 116e7c69efSopenharmony_ciRSA: A public-key cryptosystem that works on two different keys: a public encryption key and a private decryption key. 126e7c69efSopenharmony_ci 136e7c69efSopenharmony_ciAES: A block encryption standard established by the U.S. National Institute of Standards and technology (NIST). It is also called Rijndael. 146e7c69efSopenharmony_ci 156e7c69efSopenharmony_ci### Required Permissions 166e7c69efSopenharmony_ci 176e7c69efSopenharmony_ciN/A. 186e7c69efSopenharmony_ci 196e7c69efSopenharmony_ci### Usage 206e7c69efSopenharmony_ci 216e7c69efSopenharmony_ci1. On the home screen, touch the **Encrypt** button. On the **Encrypt** screen, select an encryption algorithm from the **Encryption Algorithm** drop-down list box, enter the content to be encrypted in the text box, and touch the **Encrypt** button. 226e7c69efSopenharmony_ci 236e7c69efSopenharmony_ci The encrypted content is displayed in the text box below. 246e7c69efSopenharmony_ci 256e7c69efSopenharmony_ci2. Touch the **Reset** button to clear the content in the text box. 266e7c69efSopenharmony_ci 276e7c69efSopenharmony_ci3. Touch the **Decrypt** button on the home screen. On the **Decrypt** screen, select a decryption algorithm from the **Decryption Algorithm** drop-down list box, enter the content to be decrypted in the text box, and touch the **Decrypt** button. 286e7c69efSopenharmony_ci 296e7c69efSopenharmony_ci The decrypted content is displayed in the text box below. 306e7c69efSopenharmony_ci 316e7c69efSopenharmony_ci4. Touch the **Reset** button to clear the content in the text box. 326e7c69efSopenharmony_ci 336e7c69efSopenharmony_ci### Constraints 346e7c69efSopenharmony_ci 356e7c69efSopenharmony_ci- This sample can only be run on standard-system devices. 366e7c69efSopenharmony_ci 376e7c69efSopenharmony_ci- This sample requires DevEco Studio 3.1 Canary1 (Build Version: 3.1.0.100) to compile and run. 38