import java.security.MessageDigest;
...
public String createHashSHA (String someString){
try {
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(someString.getBytes());
byte[] someStringDigest = md.digest();
String someStringHashSHA = new String(someStringDigest);
return someStringHashSHA;
}
catch (Exception e){
...
}
}
No comments:
Post a Comment