Change from MD5 to Checksum (Adler32) for json content dirty detection

This commit is contained in:
rbygrave
2021-07-29 11:40:05 +12:00
parent 94fb6414fa
commit 52fe3cf3c8
4 changed files with 46 additions and 5 deletions
@@ -0,0 +1,18 @@
package io.ebeaninternal.server.util;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class ChecksumTest {
@Test
public void checksum() {
final long val = Checksum.checksum("Hello world");
assertThat(val).isEqualTo(413860925L);
assertThat(Checksum.checksum("Hello world")).isEqualTo(val);
assertThat(Checksum.checksum("hello world")).isNotEqualTo(val);
}
}