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
© 2024 OneMinuteCode. All rights reserved.