
- 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 "<p>data:"+data;
}
}

Trending nowThis is a popular solution!
Step by stepSolved in 2 steps

- The compareTo method. First you compare this.ticker which is a String, then if they are the same then you compare by the this.purchasePrice which is a double hashCode public int hashCode() The hashCode method using the Code-> Generate equals and hashCode with no changes Overrides: hashCode in class Object Returns: int Representing the hashCode compareTo public int compareTo(Stock another) The compareTo method not auto generated Compares first by ticker and if the tickers are the same secondarily compares by price Specified by: compareTo" in interface Comparable<stock> Parameters: another - the object to be compared. Returns: int Representing order Throws: IllegalArgumentException"- if another is null.arrow_forwardWrite the lines of code to insert the key (book's ISBN) and value ("book") pair into "my_hash_table".arrow_forwardcreate a script that prompts the user for a number. then create a loop to generate that number of random hash tables. then add these hash tables to an array. powershellarrow_forward
- Estimated Completion Time: 2-3 minutes Which of the following situations will lead to an object being aliased? Select all that apply. n Assigning a list to L1, then assigning L1 to L2 n Assigning a string to S1, then assigning the result of slicing S1 (i.e. S1[:]) to S2 n Assigning a list to L1, then assigning the result of a copy() method on L1 to L2 n Assigning a list to L1, then assigning the result of slicing L1 (i.e., L1[:]) to L2 n Assigning a string to S1, then assigning the result of a replace() method on S1 to S2 n Assigning a list to L1, then using L1 in a function call with header "def foo(x: List) -> List" n Assigning a string to S1, then using S1 in a function call with header "def foo(x: str) -> None" n Assigning two lists to L1 and L2, then assigning the result of adding them to L3arrow_forward1. Use the online Hash Generator program to find the MD5 hash value for the string hello. What is its MD5 hash value? How many bytes are needed to store this value? 2. Use the online Hash Generator program to find the MD5 hash value for the string hello2019. What is its MD5 hash value? How many bytes are needed to store this value? 3. Use the online Hash Lookup program to reverse hash the values you got in Question 1 and 2. Are they successful?arrow_forwardjava Draw a picture of the HashSet created by the data shown below. Assume the HashSet (1) has an initial size of 11, (2) uses separate chaining, and (3) inserts new nodes at the start (not end) of the chain. -4, 2, 18, 23, -15, 47, 87, 2032, 5393, 2, 53432arrow_forward
- Look at the following interactive session, in which a two-dimensional list is created. How many rows and how many columns are in the list? numbers = [[1, 2], [10, 20], [100, 200], [1000, 2000]]arrow_forwardWhich statement about Hashtable is false? Hashtable implements Collection. Hashtable is thread safe. Hashtable implements Map. Deletion, insertion and lookup are nearly constant time if there are not too many entries in the hash table. 0000arrow_forwardI need help with this questions. Thank youarrow_forward
- you can search a hashtable either by the keys , or by the assiocated values. True or false ?arrow_forwardCreate a newconcrete class that implements MyMap using open addressing with quadratic probing.For simplicity, use f(key) = key % size as the hash function, where sizeis the hash-table size. Initially, the hash-table size is 6. The table size is doubledwhenever the load factor exceeds the threshold (0.5).arrow_forwardIt will use a class called NameHelper (which you will write). This class will provide methods to load the data files and to fetch name rankings by year. The JavaFX class will be using NameHelper according to the following UML, so make sure your data helper has the methods defined below: What does the (~) mean in the attached diagram.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





