Question: Java / Cryptographic hash function I need help with creating a program that will compute and print the hash digest of this string: test

Java / Cryptographic hash function

I need help with creating a program that will compute and print the hash digest of this string: "test message to be hashed"

This is to be done using SHA-256, and should use the class MessageDigest

output should be:

The digest of "test message to be hashed" is

uXi/fCgWc8h6cv0FKBKpemeyerRH1hAT9+Hiw0u5dm4=

import java.security.MessageDigest;

import java.security.NoSuchAlgorithmException

import java.util.Base64;

public class Digest {

/*

*print out the hash digest of the string

*"test message to be hashed" using the SHA-256 algorithm

*/

public static void main(String[] args) {

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!