Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Having a hard time figuring this out. 1. Create an object of MessageDigest class using the java.security.MessageDigest library. 2. Initialize the object with your selection

Having a hard time figuring this out.

image text in transcribedimage text in transcribed

1. Create an object of MessageDigest class using the java.security.MessageDigest library. 2. Initialize the object with your selection for an appropriate algorithm cipher. 3. Use the digest() method of the class to generate a hash value of byte type from the unique data string (your first and last name). 4. Convert the hash value to hex using the bytesToHex function. 5. Create a RESTFul route using the @RequestMapping method to generate and return the required information, which includes the hash value, to the web browser. Verification: Demonstrate that a hash value has been created for the unique text string (your first and last name) by executing the Java code. Then use your web browser to connect to the RESTful API server. This should show your first and last name as the unique data string in the browser, the name of the algorithm cipher you used, and the checksum hash value. Capture a screenshot of the web browser with your unique information and add it to the template provided. An example of the expected output is shown below: localhost:8443/hash Of https://localhost:8443/hash data:This is Your First and Last Name Name of Cipher Algorithm Used: CheekSum Value:30f1a11724b684140855251856837e3ee772bec3291132081393e9b0e0e945 Server Application.java 2 14 Project Explorer vad module5_skel_student src/main/java com.snhu.ss server Server Application.java > Server Application > ServerController src/main/resources static templates application properties keystore keystore.p12 src/test/java V com.snhu.server > ServerApplication Tests.java > JRE System Library [JavaSE-1.8] > El Maven Dependencies V src main java V com snhu salserver ServerApplication.java resources test package com.snhu.sslserver; 3 import org.springframework.boot.Spring Application; 5 import org.springframework.boot.autoconfigure.SpringBootApplication; 6 import org.springframework.web.bind.annotation.RequestMapping; 7 import org.springframework.web.bind. annotation. Rest Controller; 8 9 import java.security.MessageDigest; 18 import java.util.Scandes; 11 12 @SpringBootApplication 13 public class ServerApplication | 15 16 public static void main(String[] args) { SpringApplication.run(ServerApplication.class, args); 18 } 19 } 21 22 23 @RestController 124 class Server Controllert 26 //create instance of message digest MessageDigest md = MessageDigest.getInstance("SHA-256"); 29 //FIXME: Add hash function to return the checksum value for the data string that should contain your name. . 38 @RequestMapping("/hash") 31 public String myHash() { String data = "Hello Joe Smith!"; 17 28 25 27 28 return "

data:"+data; target 1. Create an object of MessageDigest class using the java.security.MessageDigest library. 2. Initialize the object with your selection for an appropriate algorithm cipher. 3. Use the digest() method of the class to generate a hash value of byte type from the unique data string (your first and last name). 4. Convert the hash value to hex using the bytesToHex function. 5. Create a RESTFul route using the @RequestMapping method to generate and return the required information, which includes the hash value, to the web browser. Verification: Demonstrate that a hash value has been created for the unique text string (your first and last name) by executing the Java code. Then use your web browser to connect to the RESTful API server. This should show your first and last name as the unique data string in the browser, the name of the algorithm cipher you used, and the checksum hash value. Capture a screenshot of the web browser with your unique information and add it to the template provided. An example of the expected output is shown below: localhost:8443/hash Of https://localhost:8443/hash data:This is Your First and Last Name Name of Cipher Algorithm Used: CheekSum Value:30f1a11724b684140855251856837e3ee772bec3291132081393e9b0e0e945 Server Application.java 2 14 Project Explorer vad module5_skel_student src/main/java com.snhu.ss server Server Application.java > Server Application > ServerController src/main/resources static templates application properties keystore keystore.p12 src/test/java V com.snhu.server > ServerApplication Tests.java > JRE System Library [JavaSE-1.8] > El Maven Dependencies V src main java V com snhu salserver ServerApplication.java resources test package com.snhu.sslserver; 3 import org.springframework.boot.Spring Application; 5 import org.springframework.boot.autoconfigure.SpringBootApplication; 6 import org.springframework.web.bind.annotation.RequestMapping; 7 import org.springframework.web.bind. annotation. Rest Controller; 8 9 import java.security.MessageDigest; 18 import java.util.Scandes; 11 12 @SpringBootApplication 13 public class ServerApplication | 15 16 public static void main(String[] args) { SpringApplication.run(ServerApplication.class, args); 18 } 19 } 21 22 23 @RestController 124 class Server Controllert 26 //create instance of message digest MessageDigest md = MessageDigest.getInstance("SHA-256"); 29 //FIXME: Add hash function to return the checksum value for the data string that should contain your name. . 38 @RequestMapping("/hash") 31 public String myHash() { String data = "Hello Joe Smith!"; 17 28 25 27 28 return "

data:"+data; target

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions

Question

I receive the training I need to do my job well.

Answered: 1 week ago