mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-22 07:31:05 +08:00
14 lines
252 B
Go
14 lines
252 B
Go
package document
|
|
|
|
import (
|
|
"encoding/hex"
|
|
|
|
"github.com/zeebo/xxh3"
|
|
)
|
|
|
|
// contentHashHex mirrors Python xxhash.xxh128(blob).hexdigest().
|
|
func contentHashHex(blob []byte) string {
|
|
sum := xxh3.Hash128(blob).Bytes()
|
|
return hex.EncodeToString(sum[:])
|
|
}
|