NCBACK-25 add protection for audio and use hash method from library
Test Workflow / test (push) Successful in 2s

This commit is contained in:
vladp
2026-01-23 13:22:02 +07:00
parent e37cc06cd0
commit 51654fd060
12 changed files with 99 additions and 40 deletions
@@ -25,9 +25,9 @@ public class FileUtil {
return new FileProtector.FileInfo(type, fileEntity.getId(), String.valueOf(fileEntity.getUserId()));
}
public int hamming64(int aHi, int aLo, int bHi, int bLo) {
return Integer.bitCount(aHi ^ bHi)
+ Integer.bitCount(aLo ^ bLo);
public int hamming64(long aHi, long aLo, long bHi, long bLo) {
return Long.bitCount(aHi ^ bHi)
+ Long.bitCount(aLo ^ bLo);
}
private FileProtector.Type determineFileType(String mimeType) {