Explore BrainMass

Explore BrainMass

    Creating a sample encryption code

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    (Simple Encryption Application) This application uses a simple technique to encrypt a number. Encryption is the process of modifying data so that only those intended to receive the data can undo the changes and view the original data. The user enters the data to be encrypted via a TextBox. The application then multiplies the number by 7 and adds 5. The
    application displays the encrypted number in a Label.

    a. Copying the template to your working directory. Copy the directory C: Exampl esTutori al 06Exerci sesSi mpl eEncrypti on to your C: Si mpl yVB2008 directory.

    b. Opening the application's template file. Double click Si mpl eEncrypti on. sl n in the SimpleEncrypti on directory to open the application.

    c. Coding the Click event handler. Encrypt the number in the Cl i ck event handler for the Encrypt Button by using the preceding technique. The user input should be stored in an Integer variable (Number) before it's encrypted. The event handler should then display the encrypted number.

    d. Clearing the result. Add an event handler for the Enter number to encrypt: TextBox's TextChanged event. This event handler should clear the Encrypted number: output Label whenever the user enters new input.

    e. Running the application. Select Debug > Start Debugging to run your application. Enter the value 25 into the Enter number to encrypt: TextBox and click the Encrypt Button. Verify that the value 180 is displayed in the Encrypted number: output Label. Enter other values and click the Encrypt Button after each. Verify that the appropriate encrypted value is displayed each time.

    f. Closing the application. Close your running application by clicking its close box.

    g. Closing the IDE. Close the Visual Basic IDE by clicking its close box.

    Please see the attached file for the full document sample.

    © BrainMass Inc. brainmass.com October 10, 2019, 6:08 am ad1c9bdddf


    Solution Summary

    The expert creates a sample encryption code. An application's template file is determined.