Create an object of MessageDigest class using the java.security.MessageDigest library. Initialize the object with your selection for an appropriate algorithm cipher. 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). Convert the hash value to hex using the bytesToHex function. Create a RESTFul route using the @RequestMapping method to generate and return the required information, which includes the hash value, to the web browser. Here, is the code to edit package com.snhu.sslserver; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @SpringBootApplication public class ServerApplication {    public static void main(String[] args) {        SpringApplication.run(ServerApplication.class, args);    } } @RestController class ServerController{ //FIXME: Add hash function to return the checksum value for the data string that should contain your name. @RequestMapping("/hash") public String myHash(){    String data = "Hello Mike Bux!"; return "data:"+data; } }

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
  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.

Here, is the code to edit

package com.snhu.sslserver;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
public class ServerApplication {

   public static void main(String[] args) {
       SpringApplication.run(ServerApplication.class, args);
   }

}

@RestController
class ServerController{
//FIXME: Add hash function to return the checksum value for the data string that should contain your name.
@RequestMapping("/hash")
public String myHash(){
   String data = "Hello Mike Bux!";

return "<p>data:"+data;
}
}

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Files and Directory
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education