How do you use MD5 hash?

Asked 2 years ago, Updated 2 years ago, 146 views

Is there a method for making MD5 hash in Java?

hash md5 hashcode

2022-09-22 22:36

1 Answers

There is a good class called MessageDigest

import java.security.*;

..

byte[] bytesOfMessage = yourString.getBytes("UTF-8");

MessageDigest md = MessageDigest.getInstance("MD5");
byte[] thedigest = md.digest(bytesOfMessage);

Try writing it like this


2022-09-22 22:36

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.