org.javers.common.string.ShaDigest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javers-core Show documentation
Show all versions of javers-core Show documentation
JaVers - object auditing and diff framework for Java
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