Class HashUtils
- java.lang.Object
-
- com.mongodb.stitch.core.services.mongodb.remote.sync.internal.HashUtils
-
public final class HashUtils extends Object
Utility functions for calculating hash ofBsonDocument
s.
-
-
Method Summary
Modifier and Type Method Description static long
hash(BsonDocument doc)
Implementation of FNV-1a hash algorithm.static byte[]
toBytes(BsonDocument doc)
-
-
-
Method Detail
-
hash
public static long hash(BsonDocument doc)
Implementation of FNV-1a hash algorithm.- Parameters:
doc
- the document to hash- Returns:
- See Also:
- ttps://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
-
toBytes
public static byte[] toBytes(BsonDocument doc)
-
-