MCPcopy Index your code
hub / github.com/Preloading/TwitterAPIBridge / encodeToUint63

Function encodeToUint63

bridge/bridge.go:548–554  ·  view source on GitHub ↗
(input string)

Source from the content-addressed store, hash-verified

546}
547
548func encodeToUint63(input string) *int64 {
549 hasher := fnv.New64a() // Create a new FNV-1a 64-bit hash
550 hasher.Write([]byte(input)) // Write the input string as bytes
551 hash := hasher.Sum64() // Get the 64-bit hash
552 result := int64(hash & ((1 << 63) - 1)) // Mask the MSB to ensure 63 bits and convert to int64
553 return &result
554}
555
556// Bluesky's API returns a letter ID for each user,
557// While twitter uses a numeric ID, meaning we

Callers 2

BlueSkyToTwitterIDFunction · 0.85
BskyMsgToTwitterIDFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected