org.javers.common.string.ShaDigest Maven / Gradle / Ivy
package org.javers.common.string;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
* @author bartosz.walacik
*/
public class ShaDigest {
public static int shortDigest(String text){
byte[] hashBytes = digest(text);
int result = 0;
for (int i=0; i